From acdb5e5c7a2dac1908a5daafd94c31bc116a1799 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 1 Apr 2018 05:28:20 +0300 Subject: [PATCH] cleanup. added fallback mechanism for IE11 and unsupported browsers. --- src/App.scss | 290 +++++++++--------- src/_variables.scss | 20 +- src/components/attachment/attachment.vue | 5 +- .../delete_button/delete_button.vue | 4 +- .../favorite_button/favorite_button.vue | 30 +- src/components/login_form/login_form.vue | 3 +- src/components/nav_panel/nav_panel.vue | 20 +- src/components/notifications/notifications.js | 5 - .../notifications/notifications.scss | 43 ++- .../notifications/notifications.vue | 4 +- .../post_status_form/post_status_form.vue | 24 +- src/components/registration/registration.vue | 28 +- .../retweet_button/retweet_button.vue | 28 +- src/components/settings/settings.vue | 1 + src/components/status/status.vue | 169 +++++----- .../style_switcher/style_switcher.vue | 11 +- src/components/timeline/timeline.vue | 71 +++-- src/components/user_card/user_card.vue | 14 +- .../user_card_content/user_card_content.js | 5 - .../user_card_content/user_card_content.vue | 22 +- src/components/user_finder/user_finder.vue | 36 +-- src/services/style_setter/style_setter.js | 16 +- 22 files changed, 464 insertions(+), 385 deletions(-) diff --git a/src/App.scss b/src/App.scss index 6e0378db..ec80626b 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,10 +1,11 @@ @import './_variables.scss'; + #app { - background-size: cover; - background-attachment: fixed; - background-repeat: no-repeat; - background-position: 0 50px; - min-height: 100vh; + background-size: cover; + background-attachment: fixed; + background-repeat: no-repeat; + background-position: 0 50px; + min-height: 100vh; } i { @@ -12,7 +13,7 @@ i { } h4 { - margin: 0; + margin: 0; } #content { @@ -26,49 +27,53 @@ h4 { } .text-center { - text-align: center; + text-align: center; } body { - font-family: sans-serif; - font-size: 14px; - margin: 0; - color: var(--fg); + font-family: sans-serif; + font-size: 14px; + margin: 0; + color: $fallback--fg; + color: var(--fg, $fallback--fg); } a { - text-decoration: none; - color: var(--link); + text-decoration: none; + color: $fallback--link; + color: var(--link, $fallback--link); } button{ - user-select: none; - color: var(--faint); - background-color: var(--btn); - border: none; - border-radius: 5px; - cursor: pointer; - border-top: 1px solid rgba(255, 255, 255, 0.2); - border-bottom: 1px solid rgba(0, 0, 0, 0.2); - box-shadow: 0px 0px 2px black; - font-size: 14px; - font-family: sans-serif; + user-select: none; + color: $fallback--faint; + color: var(--faint, $fallback--faint); + background-color: $fallback--btn; + background-color: var(--btn, $fallback--btn); + border: none; + border-radius: 5px; + cursor: pointer; + border-top: 1px solid rgba(255, 255, 255, 0.2); + border-bottom: 1px solid rgba(0, 0, 0, 0.2); + box-shadow: 0px 0px 2px black; + font-size: 14px; + font-family: sans-serif; + &:hover { + box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3); + } + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } - &:hover { - box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3); - } - - &:disabled { - cursor: not-allowed; - opacity: 0.5; - } - - &.pressed { - color: var(--faint); - background-color: var(--bg) - } + &.pressed { + color: $fallback--faint; + color: var(--faint, $fallback--faint); + background-color: $fallback--bg; + background-color: var(--bg, $fallback--bg) + } } @@ -78,11 +83,13 @@ input, textarea, select { border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-top: 1px solid rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 2px black inset; - background-color: var(--lightBg); - color: var(--lightFg); + background-color: $fallback--lightBg; + background-color: var(--lightBg, $fallback--lightBg); + color: $fallback--lightFg; + color: var(--lightFg, $fallback--lightFg); font-family: sans-serif; font-size: 14px; - padding: 5px; + padding: 8px 7px 4px; // TODO: Restyle