about summary refs log tree commit diff
path: root/app/javascript/styles
diff options
context:
space:
mode:
authorDamien Erambert <damien.erambert@me.com>2017-08-24 10:28:49 -0700
committerEugen Rochko <eugen@zeonfederated.com>2017-08-24 19:28:49 +0200
commitf72ed21cd62541881c0ad19bac1b78e82f514413 (patch)
tree628c0fab5b9e9a9926f083d1139aafe721987cd1 /app/javascript/styles
parentda172a8b1b24a19a3838d3e59f453d1b17a2a4aa (diff)
Don't load Roboto webfont when system font is used in the app (#4591)
* Don't load Roboto webfont when system font is used in the app

* remove trailing whitespace
Diffstat (limited to 'app/javascript/styles')
-rw-r--r--app/javascript/styles/basics.scss12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/javascript/styles/basics.scss b/app/javascript/styles/basics.scss
index 4e51b555c..e524b7f26 100644
--- a/app/javascript/styles/basics.scss
+++ b/app/javascript/styles/basics.scss
@@ -1,5 +1,4 @@
 body {
-  font-family: 'mastodon-font-sans-serif', sans-serif;
   background: $ui-base-color;
   background-size: cover;
   background-attachment: fixed;
@@ -14,6 +13,11 @@ 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;
+  }
+
   &.app-body {
     position: fixed;
     width: 100%;
@@ -69,7 +73,7 @@ button {
   justify-content: center;
 }
 
-.system-font {
+.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
@@ -83,3 +87,7 @@ button {
   // 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;
+}