Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add default properties to link buttons and remove redundant settings (#…
Browse files Browse the repository at this point in the history
…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 <luixxiul@users.noreply.github.com>

* Add line-height: inherit to link button

Remove redundant setting
- _GenericFeatureFeedbackDialog.scss
- _PinnedEventTile.scss
- _SpaceCreateMenu.scss

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Add font-weight: normal to link button

Remove redundant setting
- _SpotlightDialog.scss
- _UserMenu.scss

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Dedupe _link and _link_inline

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* 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 <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Apr 5, 2022
1 parent 457fc54 commit 35c49a8
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 44 deletions.
4 changes: 0 additions & 4 deletions res/css/structures/_ToastContainer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 0 additions & 5 deletions res/css/structures/_UserMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@ limitations under the License.
margin-top: 8px;
}
}

.mx_AccessibleButton_kind_link {
font-weight: normal;
font-size: inherit;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions res/css/structures/auth/_Login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions res/css/views/dialogs/_FeedbackDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions res/css/views/dialogs/_GenericFeatureFeedbackDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
1 change: 1 addition & 0 deletions res/css/views/dialogs/_SpaceSettingsDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion res/css/views/dialogs/_SpotlightDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 9 additions & 3 deletions res/css/views/elements/_AccessibleButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 0 additions & 4 deletions res/css/views/rooms/_NewRoomIntro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ limitations under the License.
}
}

.mx_AccessibleButton_kind_link {
font-size: inherit;
}

.mx_NewRoomIntro_buttons {
margin-top: 28px;
display: flex;
Expand Down
2 changes: 0 additions & 2 deletions res/css/views/rooms/_PinnedEventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ limitations under the License.

.mx_AccessibleButton_kind_link {
margin-left: 12px;
font-size: inherit;
line-height: inherit;
}
}

Expand Down
1 change: 1 addition & 0 deletions res/css/views/settings/_ProfileSettings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ limitations under the License.
margin-bottom: 28px;

> .mx_AccessibleButton_kind_link {
font-size: $font-14px;
margin-right: 10px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@ limitations under the License.
margin-top: 20px;
}
}

.mx_AccessibleButton_kind_link {
font-size: inherit;
}
}
}
1 change: 1 addition & 0 deletions res/css/views/spaces/_SpaceBasicSettings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 0 additions & 6 deletions res/css/views/spaces/_SpaceCreateMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ $spacePanelWidth: 68px;
width: min-content;
}

.mx_AccessibleButton_kind_link {
font-size: inherit;
}

.mx_AccessibleButton_disabled {
cursor: not-allowed;
}
Expand All @@ -118,7 +114,5 @@ $spacePanelWidth: 68px;
.mx_AccessibleButton_kind_link {
color: $accent;
position: relative;
font-size: inherit;
line-height: inherit;
}
}

0 comments on commit 35c49a8

Please sign in to comment.