From c0b849bdfda8a2386bc85836d2d181890746de98 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 3 May 2020 22:04:18 +0200 Subject: Fix use of inline CSS in public pages (#13576) Change `account_link_to` to use an image tag rather than some inline CSS. Dropped the `size` parameter in the process, but it wasn't used for anything except the default value of 36px. Dropped CSS rules that were always overriden, and defaulted to 36px width and height instead. --- app/javascript/styles/mastodon/about.scss | 12 ------------ app/javascript/styles/mastodon/components.scss | 5 +++++ app/javascript/styles/mastodon/widgets.scss | 6 ------ 3 files changed, 5 insertions(+), 18 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/about.scss b/app/javascript/styles/mastodon/about.scss index 711f34965..3be0aee49 100644 --- a/app/javascript/styles/mastodon/about.scss +++ b/app/javascript/styles/mastodon/about.scss @@ -543,12 +543,6 @@ $small-breakpoint: 960px; flex: 0 0 auto; } - &__avatar { - width: 44px; - height: 44px; - background-size: 44px 44px; - } - .display-name { font-size: 15px; @@ -749,12 +743,6 @@ $small-breakpoint: 960px; display: flex; align-items: center; } - - .account__avatar { - width: 44px; - height: 44px; - background-size: 44px 44px; - } } &__counters__wrapper { diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index e22b87711..3a67bde8f 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1318,8 +1318,13 @@ .account__avatar { @include avatar-radius; + display: block; position: relative; + width: 36px; + height: 36px; + background-size: 36px 36px; + &-inline { display: inline-block; vertical-align: middle; diff --git a/app/javascript/styles/mastodon/widgets.scss b/app/javascript/styles/mastodon/widgets.scss index ca050a8d9..5b97d1ec4 100644 --- a/app/javascript/styles/mastodon/widgets.scss +++ b/app/javascript/styles/mastodon/widgets.scss @@ -93,12 +93,6 @@ display: flex; align-items: center; } - - .account__avatar { - width: 44px; - height: 44px; - background-size: 44px 44px; - } } .trends__item { -- cgit