From aa0564406a95824cc45c815571292716b65806a1 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 31 Mar 2018 21:14:36 +0300 Subject: getting rid of baseXX, some small fixes. Seems to be usable. --- src/_variables.scss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/_variables.scss') diff --git a/src/_variables.scss b/src/_variables.scss index d2b7065d..fa7eaec1 100644 --- a/src/_variables.scss +++ b/src/_variables.scss @@ -1,7 +1,6 @@ $main-color: #f58d2c; $main-background: white; $darkened-background: whitesmoke; -$green: #0fa00f; -$blue: #0095ff; -$red: #ff0000; - +$green_: #0fa00f; +$blue_: #0095ff; +$red_: #ff0000; -- cgit v1.2.3-70-g09d2 From acdb5e5c7a2dac1908a5daafd94c31bc116a1799 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 1 Apr 2018 05:28:20 +0300 Subject: cleanup. added fallback mechanism for IE11 and unsupported browsers. --- src/App.scss | 290 +++++++++++---------- src/_variables.scss | 20 +- src/components/attachment/attachment.vue | 5 +- src/components/delete_button/delete_button.vue | 4 +- src/components/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 - src/components/notifications/notifications.scss | 43 +-- src/components/notifications/notifications.vue | 4 +- .../post_status_form/post_status_form.vue | 24 +- src/components/registration/registration.vue | 28 +- src/components/retweet_button/retweet_button.vue | 28 +- src/components/settings/settings.vue | 1 + src/components/status/status.vue | 169 ++++++------ src/components/style_switcher/style_switcher.vue | 11 +- src/components/timeline/timeline.vue | 67 ++--- 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, 462 insertions(+), 383 deletions(-) (limited to 'src/_variables.scss') 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; - - - - &:hover { - box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3); - } + 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; - &:disabled { - cursor: not-allowed; - opacity: 0.5; - } + &:hover { + box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3); + } - &.pressed { - color: var(--faint); - background-color: var(--bg) - } + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } + + &.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 in a decent way. Needs different markup // -webkit-appearance:none; @@ -109,32 +112,27 @@ input, textarea, select { transition: color 200ms; width: 1.1em; height: 1.1em; - border-radius: 2px; + border-radius: $fallback--checkBoxRadius; + border-radius: var(--checkBoxRadius, $fallback--checkBoxRadius); 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; margin-right: .5em; background-color: $fallback--btn; background-color: var(--btn, $fallback--btn); - vertical-align: baseline; + vertical-align: top; text-align: center; line-height: 1.1em; font-size: 1.1em; box-sizing: border-box; color: transparent; overflow: hidden; + box-sizing: border-box; } } } -.icon-cancel, -.icon-reply, -.icon-retweet, -.icon-star-empty, -.icon-eye-off, -.icon-binoculars, -.icon-plus-squared, -.icon-spin4 { +i[class^=icon-] { color: $fallback--icon; color: var(--icon, $fallback--icon) } @@ -188,6 +186,11 @@ nav { background-repeat: no-repeat; background-position: center; background-size: contain; + + a i { + color: $fallback--link; + color: var(--link, $fallback--link); + } } } @@ -215,9 +218,8 @@ main-router { background-color: $fallback--bg; background-color: var(--bg, $fallback--bg); - border-radius: 10px; border-radius: $fallback--panelRadius; - border-radius: var(--panelRadius, 10px); + border-radius: var(--panelRadius, $fallback--panelRadius); box-shadow: 1px 1px 4px rgba(0,0,0,.6); overflow: hidden; } @@ -230,7 +232,8 @@ main-router { } .panel-heading { - border-radius: 10px 10px 0 0; + border-radius: $fallback--panelRadius $fallback--panelRadius 0 0; + border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0; background-size: cover; padding: 0.6em 1.0em; text-align: left; @@ -241,7 +244,8 @@ main-router { } .panel-footer { - border-radius: 0 0 10px 10px; + border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius; + border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius); } .panel-body > p { diff --git a/src/_variables.scss b/src/_variables.scss index eccc0aab..1f5d4b3e 100644 --- a/src/_variables.scss +++ b/src/_variables.scss @@ -15,6 +15,11 @@ $fallback--cRed: #ff0000; $fallback--cBlue: #0095ff; $fallback--cGreen: #0fa00f; $fallback--cOrange: orange; -$fallback--cYellow: yellow; $fallback--panelRadius: 10px; +$fallback--checkBoxRadius: 2px; +$fallback--btnRadius: 4px; +$fallback--tooltipRadius: 5px; +$fallback--avatarRadius: 4px; +$fallback--avatarAltRadius: 10px; +$fallback--attachmentRadius: 10px; diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index e3b1e4d4..1fdee5d3 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -52,7 +52,8 @@ border-style: solid; border-width: 1px; - border-radius: 5px; + border-radius: $fallback--attachmentRadius; + border-radius: var(--attachmentRadius, $fallback--attachmentRadius); overflow: hidden; // fixes small gap below video @@ -109,7 +110,8 @@ flex: 1; img { border: 0px; - border-radius: 5px; + border-radius: $fallback--attachmentRadius; + border-radius: var(--attachmentRadius, $fallback--attachmentRadius); height: 100%; object-fit: cover; } diff --git a/src/components/chat_panel/chat_panel.vue b/src/components/chat_panel/chat_panel.vue index 69996f76..fd997aa8 100644 --- a/src/components/chat_panel/chat_panel.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -29,30 +29,36 @@ diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue index 82000d6b..ac492262 100644 --- a/src/components/login_form/login_form.vue +++ b/src/components/login_form/login_form.vue @@ -34,21 +34,17 @@ @import '../../_variables.scss'; .login-form { - input { - border-radius: 5px; - padding: 0.1em 0.2em 0.2em 0.2em; - } - .btn { min-height: 28px; width: 10em; } .error { - border-radius: 5px; + border-radius: $fallback--tooltipRadius; + border-radius: var(--tooltipRadius, $fallback--tooltipRadius); text-align: center; background-color: rgba(255, 48, 16, 0.65); - background-color: $fallback--cRed; + background-color: $fallback--cRed; min-height: 28px; line-height: 28px; } diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue index 8e83e7f1..8b931d2d 100644 --- a/src/components/media_upload/media_upload.vue +++ b/src/components/media_upload/media_upload.vue @@ -1,7 +1,7 @@