about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-09-01 23:13:31 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-01 16:13:31 +0200
commit2305f7c391325c7abf8746ebb2bb560c13df4437 (patch)
tree53e0d6023d6c68278d363dfe8301f5cbca9896f8 /app/javascript/styles
parentff7d02b2360bea107519f923cf084cbdd7fbca07 (diff)
Use system's default font on non web UI pages (#4553)
* Use system's default font on non web UI pages

* Remove import for Redirect
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/basics.scss36
1 files changed, 14 insertions, 22 deletions
diff --git a/app/javascript/styles/basics.scss b/app/javascript/styles/basics.scss
index 6e87157ec..f18a32201 100644
--- a/app/javascript/styles/basics.scss
+++ b/app/javascript/styles/basics.scss
@@ -1,4 +1,5 @@
 body {
+  font-family: 'mastodon-font-sans-serif', sans-serif;
   background: $ui-base-color;
   background-size: cover;
   background-attachment: fixed;
@@ -13,9 +14,19 @@ body {
   -webkit-tap-highlight-color: rgba(0,0,0,0);
   -webkit-tap-highlight-color: transparent;
 
-  // This is done because we want to use mastodon-font-sans-serif (a.k.a Roboto) on the `.ui` element in the app UI
-  &:not(.app-body) {
-    font-family: 'mastodon-font-sans-serif', sans-serif;
+  &.system-font {
+    // system-ui => standard property (Chrome/Android WebView 56+, Opera 43+, Safari 11+)
+    // -apple-system => Safari <11 specific
+    // BlinkMacSystemFont => Chrome <56 on macOS specific
+    // Segoe UI => Windows 7/8/10
+    // Oxygen => KDE
+    // Ubuntu => Unity/Ubuntu
+    // Cantarell => GNOME
+    // Fira Sans => Firefox OS
+    // Droid Sans => Older Androids (<4.0)
+    // Helvetica Neue => Older macOS <10.11
+    // mastodon-font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
+    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", mastodon-font-sans-serif, sans-serif;
   }
 
   &.app-body {
@@ -72,22 +83,3 @@ button {
   align-items: center;
   justify-content: center;
 }
-
-.ui.system-font {
-  // system-ui => standard property (Chrome/Android WebView 56+, Opera 43+, Safari 11+)
-  // -apple-system => Safari <11 specific
-  // BlinkMacSystemFont => Chrome <56 on macOS specific
-  // Segoe UI => Windows 7/8/10
-  // Oxygen => KDE
-  // Ubuntu => Unity/Ubuntu
-  // Cantarell => GNOME
-  // Fira Sans => Firefox OS
-  // Droid Sans => Older Androids (<4.0)
-  // Helvetica Neue => Older macOS <10.11
-  // mastodon-font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
-  font-family: system-ui, -apple-system,BlinkMacSystemFont, "Segoe UI","Oxygen", "Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",mastodon-font-sans-serif, sans-serif;
-}
-
-.ui:not(.system-font) {
-  font-family: 'mastodon-font-sans-serif', sans-serif;
-}