website: fix for safari and ms edge
This commit is contained in:
parent
c10bbc8a18
commit
098f2aaf32
3 changed files with 18 additions and 12 deletions
|
|
@ -59,13 +59,19 @@ endfor
|
|||
<meta property="og:type" content="product">
|
||||
<meta property="og:locale" content="en_US" />
|
||||
</head>
|
||||
<script>
|
||||
<script>
|
||||
(function(u){
|
||||
if (u.indexOf('Safari/') != -1 && u.indexOf('Chrome/') == -1 && u.indexOf('Chromium/') == -1) {
|
||||
document.documentElement.classList.add('safari')
|
||||
if (
|
||||
( u.indexOf('Safari/') != -1 &&
|
||||
u.indexOf('Chrome/') == -1 &&
|
||||
u.indexOf('Chromium/') == -1 ) ||
|
||||
u.indexOf('Edge/') != -1
|
||||
) {
|
||||
// Use alternate variable font for Safari and MS Edge
|
||||
document.documentElement.classList.add('vf-alt')
|
||||
}
|
||||
})(navigator.userAgent);
|
||||
</script>
|
||||
</script>
|
||||
<body>
|
||||
<div id="hud-notification"><div class="msg">Hello</div></div>
|
||||
<script src="{{url_root}}res/base.js?v={{ base_js_v }}"></script>
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ body {
|
|||
scroll-behavior: smooth;
|
||||
|
||||
font-kerning: normal;
|
||||
-moz-font-feature-settings:"kern" 1, "liga" 1;
|
||||
-ms-font-feature-settings:"kern" 1, "liga" 1;
|
||||
-o-font-feature-settings:"kern" 1, "liga" 1;
|
||||
-webkit-font-feature-settings:"kern" 1, "liga" 1;
|
||||
font-feature-settings:"kern" 1, "liga" 1;
|
||||
-moz-font-feature-settings: "calt" 1, "kern" 1, "liga" 1;
|
||||
-ms-font-feature-settings: "calt" 1, "kern" 1, "liga" 1;
|
||||
-o-font-feature-settings: "calt" 1, "kern" 1, "liga" 1;
|
||||
-webkit-font-feature-settings: "calt" 1, "kern" 1, "liga" 1;
|
||||
font-feature-settings: "calt" 1, "kern" 1, "liga" 1;
|
||||
}
|
||||
|
||||
/* Font style classifiers used by samples and dynmetrics */
|
||||
|
|
@ -44,8 +44,8 @@ body {
|
|||
body {
|
||||
font-family: 'Inter UI var', system-ui, sans-serif;
|
||||
}
|
||||
html.safari body {
|
||||
font-family: 'Inter UI var safari-fix', system-ui, sans-serif;
|
||||
html.vf-alt body {
|
||||
font-family: 'Inter UI var alt', system-ui, sans-serif;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ tt {
|
|||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(function(u){
|
||||
if (u.indexOf('Safari/') != -1 && u.indexOf('Chrome/') == -1 && u.indexOf('Chromium/') == -1) {
|
||||
|
|
@ -136,6 +135,7 @@ if (u.indexOf('Safari/') != -1 && u.indexOf('Chrome/') == -1 && u.indexOf('Chrom
|
|||
}
|
||||
})(navigator.userAgent);
|
||||
</script>
|
||||
<body>
|
||||
<div class="intro">
|
||||
<h1>Inter UI variable font test</h1>
|
||||
<p>
|
||||
|
|
|
|||
Reference in a new issue