Skip to content

Commit 9a75da5

Browse files
committed
♻️ Update for Edge/IE related to CSS [ms-high-contrast]
1 parent 5bf2268 commit 9a75da5

21 files changed

+130
-35
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* IE Fallback for basic layout with key elements */
2+
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
3+
.content,
4+
ul.results li {
5+
padding: 20px;
6+
margin: 20px;
7+
box-shadow: 0 1px 2px 1px rgba(0,0,0,0.5);
8+
}
9+
10+
ul.image-categories { width:90vh; }
11+
body { margin:40px; }
12+
nav, h2 { padding:20px; }
13+
ul.info { margin-left:20px; }
14+
input[type='text'] { margin-bottom: 20px; }
15+
}

examples/css/image-classification.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,6 @@
77
--padding: 20px;
88
}
99

10-
/* IE Fallback for basic layout with key elements */
11-
.content,
12-
ul.results li {
13-
padding: 20px;
14-
margin: 20px;
15-
box-shadow: 0 1px 2px 1px rgba(0,0,0,0.5);
16-
}
17-
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
18-
ul.image-categories { width:90vh; }
19-
body { margin:40px; }
20-
nav, h2 { padding:20px; }
21-
ul.info { margin-left:20px; }
22-
input[type='text'] { margin-bottom: 20px; }
23-
}
24-
2510
/* Page Style */
2611
body {
2712
background-color: rgba(240, 248, 255, 1);

examples/hello-world/hbs.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<title>DataFormsJS - {{title}}</title>
77
<link rel="stylesheet" href="hello-world.css">
88
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
9+
<script nomodule>
10+
var link = document.createElement('link');
11+
link.rel = 'stylesheet';
12+
link.href = 'hello-world-ie.css';
13+
document.head.appendChild(link);
14+
</script>
915
</head>
1016
<body>
1117
<div id="view" dir="auto"></div>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* Adjust top/left of orbit for IE */
2+
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
3+
.home-page-animation .orbit {
4+
top: calc((100% - 152px) / 1.5);
5+
left: calc((100% - 152px) / 2);
6+
}
7+
}

examples/hello-world/hello-world.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ template { display:none; }
5656
width: 152px;
5757
will-change: transform;
5858
}
59-
/* Adjust top/left of orbit for IE */
60-
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
61-
.home-page-animation .orbit {
62-
top: calc((100% - 152px) / 1.5);
63-
left: calc((100% - 152px) / 2);
64-
}
65-
}
6659

6760
.home-page-animation .orbit {
6861
animation: rotate-and-spin-clockwise 6s linear infinite;

examples/hello-world/hyperapp.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
}
1414
</style>
1515
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
16+
<script nomodule>
17+
var link = document.createElement('link');
18+
link.rel = 'stylesheet';
19+
link.href = 'hello-world-ie.css';
20+
document.head.appendChild(link);
21+
</script>
1622
</head>
1723
<body>
1824
<div id="root" dir="auto"></div>

examples/hello-world/js.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<title>DataFormsJS - {{title}}</title>
77
<link rel="stylesheet" href="hello-world.css">
88
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
9+
<script nomodule>
10+
var link = document.createElement('link');
11+
link.rel = 'stylesheet';
12+
link.href = 'hello-world-ie.css';
13+
document.head.appendChild(link);
14+
</script>
915
</head>
1016
<body>
1117
<div id="view" dir="auto"></div>

examples/hello-world/preact.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
}
1313
</style>
1414
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
15+
<script nomodule>
16+
var link = document.createElement('link');
17+
link.rel = 'stylesheet';
18+
link.href = 'hello-world-ie.css';
19+
document.head.appendChild(link);
20+
</script>
1521
</head>
1622
<body>
1723
<div id="root" dir="auto"></div>

examples/hello-world/rax.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<title>DataFormsJS - {{title}}</title>
77
<link rel="stylesheet" href="hello-world.css">
88
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
9+
<script nomodule>
10+
var link = document.createElement('link');
11+
link.rel = 'stylesheet';
12+
link.href = 'hello-world-ie.css';
13+
document.head.appendChild(link);
14+
</script>
915
</head>
1016
<body>
1117
<div id="root" dir="auto"></div>

examples/hello-world/react.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<title>DataFormsJS - {{title}}</title>
77
<link rel="stylesheet" href="hello-world.css">
88
<link rel="canonical" href="https://www.dataformsjs.com/examples/hello-world/{{lang}}/web.htm">
9+
<script nomodule>
10+
var link = document.createElement('link');
11+
link.rel = 'stylesheet';
12+
link.href = 'hello-world-ie.css';
13+
document.head.appendChild(link);
14+
</script>
915
</head>
1016
<body>
1117
<div id="root" dir="auto"></div>

0 commit comments

Comments
 (0)