From 35c49a8cd83135cbc4ca7107a2435a13d3c56bec Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Tue, 5 Apr 2022 17:29:35 +0000 Subject: [PATCH] Add default properties to link buttons and remove redundant settings (#8151) * Add font-size: inherit to link button Remove redundant font-size settings _FeedbackDialog.scss _GenericFeatureFeedbackDialog.scss _Login.scss _NewRoomIntro.scss _NotificationSettingsTab.scss _PinnedEventTile.scss _PreferencesUserSettingsTab.scss _SpaceCreateMenu.scss _ToastContainer.scss _UserMenu.scss Specify font-size - _ProfileSettings.scss - _SpaceBasicSettings.scss - _SpaceSettingsDialog.scss Signed-off-by: Suguru Hirahara * Add line-height: inherit to link button Remove redundant setting - _GenericFeatureFeedbackDialog.scss - _PinnedEventTile.scss - _SpaceCreateMenu.scss Signed-off-by: Suguru Hirahara * Add font-weight: normal to link button Remove redundant setting - _SpotlightDialog.scss - _UserMenu.scss Signed-off-by: Suguru Hirahara * Dedupe _link and _link_inline Signed-off-by: Suguru Hirahara * Set inline to "link_inline" Treat the button as its name indicates. For elements that should not be inlined, "link" should be used. Signed-off-by: Suguru Hirahara --- res/css/structures/_ToastContainer.scss | 4 ---- res/css/structures/_UserMenu.scss | 5 ----- res/css/structures/auth/_Login.scss | 3 +-- res/css/views/dialogs/_FeedbackDialog.scss | 4 ---- .../views/dialogs/_GenericFeatureFeedbackDialog.scss | 5 ----- res/css/views/dialogs/_SpaceSettingsDialog.scss | 1 + res/css/views/dialogs/_SpotlightDialog.scss | 1 - res/css/views/elements/_AccessibleButton.scss | 12 +++++++++--- res/css/views/rooms/_NewRoomIntro.scss | 4 ---- res/css/views/rooms/_PinnedEventTile.scss | 2 -- res/css/views/settings/_ProfileSettings.scss | 1 + .../settings/tabs/room/_NotificationSettingsTab.scss | 4 ---- .../tabs/user/_PreferencesUserSettingsTab.scss | 4 ---- res/css/views/spaces/_SpaceBasicSettings.scss | 1 + res/css/views/spaces/_SpaceCreateMenu.scss | 6 ------ 15 files changed, 13 insertions(+), 44 deletions(-) diff --git a/res/css/structures/_ToastContainer.scss b/res/css/structures/_ToastContainer.scss index 5137aed95a5..2609ddff7fb 100644 --- a/res/css/structures/_ToastContainer.scss +++ b/res/css/structures/_ToastContainer.scss @@ -157,10 +157,6 @@ limitations under the License. margin: 4px 0 11px 0; font-size: $font-12px; - .mx_AccessibleButton_kind_link { - font-size: inherit; - } - a { text-decoration: none; } diff --git a/res/css/structures/_UserMenu.scss b/res/css/structures/_UserMenu.scss index 90b825c886e..a88e9eddb90 100644 --- a/res/css/structures/_UserMenu.scss +++ b/res/css/structures/_UserMenu.scss @@ -147,11 +147,6 @@ limitations under the License. margin-top: 8px; } } - - .mx_AccessibleButton_kind_link { - font-weight: normal; - font-size: inherit; - } } } diff --git a/res/css/structures/auth/_Login.scss b/res/css/structures/auth/_Login.scss index 0e6912e4352..638917f1c28 100644 --- a/res/css/structures/auth/_Login.scss +++ b/res/css/structures/auth/_Login.scss @@ -88,13 +88,12 @@ limitations under the License. div.mx_AccessibleButton_kind_link.mx_Login_forgot { display: block; margin: 0 auto; - // style it as a link - font-size: inherit; &.mx_AccessibleButton_disabled { cursor: not-allowed; } } + .mx_Login_spinner { display: flex; justify-content: center; diff --git a/res/css/views/dialogs/_FeedbackDialog.scss b/res/css/views/dialogs/_FeedbackDialog.scss index 588f65eb65c..8d11b83fe11 100644 --- a/res/css/views/dialogs/_FeedbackDialog.scss +++ b/res/css/views/dialogs/_FeedbackDialog.scss @@ -58,10 +58,6 @@ limitations under the License. line-height: $font-15px; } - .mx_AccessibleButton_kind_link { - font-size: inherit; - } - a, .mx_AccessibleButton_kind_link { color: $accent; text-decoration: underline; diff --git a/res/css/views/dialogs/_GenericFeatureFeedbackDialog.scss b/res/css/views/dialogs/_GenericFeatureFeedbackDialog.scss index 3898e097567..83f93495143 100644 --- a/res/css/views/dialogs/_GenericFeatureFeedbackDialog.scss +++ b/res/css/views/dialogs/_GenericFeatureFeedbackDialog.scss @@ -21,9 +21,4 @@ limitations under the License. line-height: $font-20px; margin-bottom: 24px; } - - .mx_AccessibleButton_kind_link { - font-size: inherit; - line-height: inherit; - } } diff --git a/res/css/views/dialogs/_SpaceSettingsDialog.scss b/res/css/views/dialogs/_SpaceSettingsDialog.scss index 31a544d166f..ead082dba68 100644 --- a/res/css/views/dialogs/_SpaceSettingsDialog.scss +++ b/res/css/views/dialogs/_SpaceSettingsDialog.scss @@ -77,6 +77,7 @@ limitations under the License. .mx_AccessibleButton_hasKind { &.mx_AccessibleButton_kind_link { + font-size: $font-14px; margin: 7px 18px; &.mx_SettingsTab_showAdvanced { diff --git a/res/css/views/dialogs/_SpotlightDialog.scss b/res/css/views/dialogs/_SpotlightDialog.scss index 3041c860424..9f78d905b52 100644 --- a/res/css/views/dialogs/_SpotlightDialog.scss +++ b/res/css/views/dialogs/_SpotlightDialog.scss @@ -241,7 +241,6 @@ limitations under the License. .mx_SpotlightDialog_recentSearches > h4 > .mx_AccessibleButton_kind_link { padding: 0; float: right; - font-weight: normal; font-size: $font-12px; line-height: $font-15px; color: $secondary-content; diff --git a/res/css/views/elements/_AccessibleButton.scss b/res/css/views/elements/_AccessibleButton.scss index a87aab7af85..b2a585decad 100644 --- a/res/css/views/elements/_AccessibleButton.scss +++ b/res/css/views/elements/_AccessibleButton.scss @@ -130,14 +130,20 @@ limitations under the License. } } - &.mx_AccessibleButton_kind_link { + &.mx_AccessibleButton_kind_link, + &.mx_AccessibleButton_kind_link_inline { color: $accent; + font-size: inherit; + font-weight: normal; + line-height: inherit; + } + + &.mx_AccessibleButton_kind_link { padding: 0; } &.mx_AccessibleButton_kind_link_inline { - color: $accent; - font-size: inherit; + display: inline; padding: 0 2px; } diff --git a/res/css/views/rooms/_NewRoomIntro.scss b/res/css/views/rooms/_NewRoomIntro.scss index e2a792e670b..1b7e298ef6b 100644 --- a/res/css/views/rooms/_NewRoomIntro.scss +++ b/res/css/views/rooms/_NewRoomIntro.scss @@ -23,10 +23,6 @@ limitations under the License. } } - .mx_AccessibleButton_kind_link { - font-size: inherit; - } - .mx_NewRoomIntro_buttons { margin-top: 28px; display: flex; diff --git a/res/css/views/rooms/_PinnedEventTile.scss b/res/css/views/rooms/_PinnedEventTile.scss index 3673ae42e9a..d31b1cbcda4 100644 --- a/res/css/views/rooms/_PinnedEventTile.scss +++ b/res/css/views/rooms/_PinnedEventTile.scss @@ -92,8 +92,6 @@ limitations under the License. .mx_AccessibleButton_kind_link { margin-left: 12px; - font-size: inherit; - line-height: inherit; } } diff --git a/res/css/views/settings/_ProfileSettings.scss b/res/css/views/settings/_ProfileSettings.scss index f62b45d1e5b..ae77a432e0a 100644 --- a/res/css/views/settings/_ProfileSettings.scss +++ b/res/css/views/settings/_ProfileSettings.scss @@ -61,6 +61,7 @@ limitations under the License. margin-bottom: 28px; > .mx_AccessibleButton_kind_link { + font-size: $font-14px; margin-right: 10px; } } diff --git a/res/css/views/settings/tabs/room/_NotificationSettingsTab.scss b/res/css/views/settings/tabs/room/_NotificationSettingsTab.scss index 3dcd4566a50..036a3a5389f 100644 --- a/res/css/views/settings/tabs/room/_NotificationSettingsTab.scss +++ b/res/css/views/settings/tabs/room/_NotificationSettingsTab.scss @@ -50,10 +50,6 @@ limitations under the License. font-size: $font-12px; line-height: $font-15px; margin-right: 32px; - - .mx_AccessibleButton_kind_link { - font-size: inherit; - } } } diff --git a/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss b/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss index 00691679eee..ea979ac074c 100644 --- a/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss +++ b/res/css/views/settings/tabs/user/_PreferencesUserSettingsTab.scss @@ -32,9 +32,5 @@ limitations under the License. margin-top: 20px; } } - - .mx_AccessibleButton_kind_link { - font-size: inherit; - } } } diff --git a/res/css/views/spaces/_SpaceBasicSettings.scss b/res/css/views/spaces/_SpaceBasicSettings.scss index 976960f90d3..5ed772fa85f 100644 --- a/res/css/views/spaces/_SpaceBasicSettings.scss +++ b/res/css/views/spaces/_SpaceBasicSettings.scss @@ -65,6 +65,7 @@ limitations under the License. display: inline-block; margin: auto 18px; color: #368bd6; + font-size: $font-14px; // See _SpaceSettingsDialog.scss } > .mx_SpaceBasicSettings_avatar_remove { diff --git a/res/css/views/spaces/_SpaceCreateMenu.scss b/res/css/views/spaces/_SpaceCreateMenu.scss index 3151b35c851..2b24b9a2dcf 100644 --- a/res/css/views/spaces/_SpaceCreateMenu.scss +++ b/res/css/views/spaces/_SpaceCreateMenu.scss @@ -93,10 +93,6 @@ $spacePanelWidth: 68px; width: min-content; } - .mx_AccessibleButton_kind_link { - font-size: inherit; - } - .mx_AccessibleButton_disabled { cursor: not-allowed; } @@ -118,7 +114,5 @@ $spacePanelWidth: 68px; .mx_AccessibleButton_kind_link { color: $accent; position: relative; - font-size: inherit; - line-height: inherit; } }