Disallow invalid inline style comments in stylesheets (#9099)

This commit is contained in:
Germain 2022-07-27 14:39:29 +01:00 committed by GitHub
parent 8eeeee1aa2
commit 72c24af5c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
193 changed files with 1520 additions and 1518 deletions

View file

@ -16,7 +16,7 @@ limitations under the License.
.mx_AvatarSetting_avatar {
width: 90px;
min-width: 90px; // so it doesn't get crushed by the flexbox in languages with longer words
min-width: 90px; /* so it doesn't get crushed by the flexbox in languages with longer words */
height: 90px;
margin-top: 8px;
position: relative;
@ -24,26 +24,26 @@ limitations under the License.
.mx_AvatarSetting_hover {
transition: opacity $hover-transition;
// position to place the hover bg over the entire thing
/* position to place the hover bg over the entire thing */
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
pointer-events: none; // let the pointer fall through the underlying thing
pointer-events: none; /* let the pointer fall through the underlying thing */
line-height: 90px;
text-align: center;
> span {
color: $primary-content;
position: relative; // tricks the layout engine into putting this on top of the bg
position: relative; /* tricks the layout engine into putting this on top of the bg */
font-weight: 500;
}
.mx_AvatarSetting_hoverBg {
// absolute position to lazily fill the entire container
/* absolute position to lazily fill the entire container */
position: absolute;
top: 0;
bottom: 0;

View file

@ -32,11 +32,11 @@ limitations under the License.
display: flow-root;
&.mx_IRCLayout {
padding-top: 9px; // TODO: Use a spacing variable
padding-top: 9px; /* TODO: Use a spacing variable */
}
.mx_EventTile[data-layout="bubble"] {
margin-top: 30px; // TODO: Use a spacing variable
margin-top: 30px; /* TODO: Use a spacing variable */
}
.mx_EventTile_msgOption {
@ -47,7 +47,7 @@ limitations under the License.
.mx_FontScalingPanel_fontSlider {
display: flex;
align-items: center;
padding: 15px $spacing-20 35px; // TODO: Use spacing variables
padding: 15px $spacing-20 35px; /* TODO: Use spacing variables */
background: rgba($quinary-content, 0.2);
border-radius: 10px;
font-size: $font-10px;

View file

@ -19,10 +19,10 @@ limitations under the License.
.mx_ImageSizePanel_radios {
display: flex;
margin-top: 16px; // move away from header a bit
margin-top: 16px; /* move away from header a bit */
> label {
margin-right: 68px; // keep the boxes separate
margin-right: 68px; /* keep the boxes separate */
cursor: pointer;
}
@ -33,7 +33,7 @@ limitations under the License.
mask-position: center;
width: 221px;
height: 148px;
margin-bottom: 14px; // move radio button away from bottom edge a bit
margin-bottom: 14px; /* move radio button away from bottom edge a bit */
&.mx_ImageSizePanel_sizeDefault {
mask: url("$(res)/img/element-icons/settings/img-size-normal.svg");

View file

@ -36,7 +36,7 @@ limitations under the License.
> span {
font-weight: 500;
font-size: $font-14px;
line-height: 32px; // matches height of avatar for v-align
line-height: 32px; /* matches height of avatar for v-align */
color: $secondary-content;
display: inline-block;

View file

@ -15,14 +15,14 @@ limitations under the License.
*/
.mx_UserNotifSettings_grid {
width: calc(100% + 12px); // +12px to line up center of 'Noisy' column with toggle switches
width: calc(100% + 12px); /* +12px to line up center of 'Noisy' column with toggle switches */
display: grid;
grid-template-columns: auto repeat(3, 62px);
place-items: center center;
grid-gap: 8px;
margin-top: $spacing-40;
// Override StyledRadioButton default styles
/* Override StyledRadioButton default styles */
.mx_StyledRadioButton {
justify-content: center;
@ -46,9 +46,9 @@ limitations under the License.
.mx_UserNotifSettings_gridRowLabel {
justify-self: start;
// <legend> does not accept
// display: inline | inline-block
// force it inline using float
/* <legend> does not accept */
/* display: inline | inline-block */
/* force it inline using float */
float: left;
}
.mx_UserNotifSettings_gridRowHeading {
@ -63,12 +63,12 @@ limitations under the License.
}
.mx_UserNotifSettings {
color: $primary-content; // override from default settings page styles
color: $primary-content; /* override from default settings page styles */
.mx_UserNotifSettings_floatingSection {
margin-top: 40px;
& > div:first-child { // section header
& > div:first-child { /* section header */
font-size: $font-18px;
font-weight: $font-semi-bold;
}
@ -79,7 +79,7 @@ limitations under the License.
margin-top: 8px;
tr > td:first-child {
// Just for a bit of spacing
/* Just for a bit of spacing */
padding-right: 8px;
}
}
@ -90,7 +90,7 @@ limitations under the License.
}
.mx_TagComposer {
margin-top: 35px; // lots of distance from the last line of the table
margin-top: 35px; /* lots of distance from the last line of the table */
}
}

View file

@ -51,12 +51,12 @@ limitations under the License.
}
.mx_ProfileSettings_buttons {
margin-top: 10px; // 18px is already accounted for by the <p> above the buttons
margin-top: 10px; /* 18px is already accounted for by the <p> above the buttons */
margin-bottom: $spacing-28;
> .mx_AccessibleButton_kind_link {
font-size: $font-14px;
margin-inline-end: 10px; // TODO: Use a spacing variable
margin-inline-end: 10px; /* TODO: Use a spacing variable */
}
}
}

View file

@ -34,7 +34,7 @@ limitations under the License.
.mx_ToggleSwitch {
align-self: flex-start;
min-width: var(--ToggleSwitch-min-width); // avoid compression
min-width: var(--ToggleSwitch-min-width); /* avoid compression */
}
}
}

View file

@ -50,14 +50,14 @@ limitations under the License.
> .mx_StyledRadioButton_enabled {
opacity: 1;
// These colors need to be hardcoded because they don't change with the theme
/* These colors need to be hardcoded because they don't change with the theme */
&.mx_ThemeSelector_light {
background-color: #f3f8fd;
color: #2e2f32;
}
&.mx_ThemeSelector_dark {
// 5% lightened version of 181b21
/* 5% lightened version of 181b21 */
background-color: #25282e;
color: #f3f8fd;
}

View file

@ -16,9 +16,9 @@ limitations under the License.
.mx_SettingsTab {
--SettingsTab_section-margin-bottom-preferences-labs: 30px;
--SettingsTab_heading_nth_child-margin-top: 30px; // TODO: Use a spacing variable
--SettingsTab_heading_nth_child-margin-top: 30px; /* TODO: Use a spacing variable */
--SettingsTab_fullWidthField-margin-inline-end: 100px;
--SettingsTab_tooltip-max-width: 120px; // So it fits in the space provided by the page
--SettingsTab_tooltip-max-width: 120px; /* So it fits in the space provided by the page */
color: $primary-content;
@ -35,8 +35,8 @@ limitations under the License.
font-size: $font-20px;
font-weight: 600;
color: $primary-content;
margin-top: 10px; // TODO: Use a spacing variable
margin-bottom: 10px; // TODO: Use a spacing variable
margin-top: 10px; /* TODO: Use a spacing variable */
margin-bottom: 10px; /* TODO: Use a spacing variable */
&:nth-child(n + 2) {
margin-top: var(--SettingsTab_heading_nth_child-margin-top);
@ -49,16 +49,16 @@ limitations under the License.
font-weight: 600;
color: $primary-content;
margin-top: $spacing-12;
margin-bottom: 10px; // TODO: Use a spacing variable
margin-bottom: 10px; /* TODO: Use a spacing variable */
}
.mx_SettingsTab_subsectionText {
color: $secondary-content;
font-size: $font-14px;
display: block;
margin-top: 10px; // TODO: Use a spacing variable
margin-inline-end: 80px; // Align with the rest of the view
margin-bottom: 10px; // TODO: Use a spacing variable
margin-top: 10px; /* TODO: Use a spacing variable */
margin-inline-end: 80px; /* Align with the rest of the view */
margin-bottom: 10px; /* TODO: Use a spacing variable */
margin-inline-start: 0;
}
@ -69,12 +69,12 @@ limitations under the License.
.mx_SettingsFlag {
margin-inline-end: $end-gutter;
margin-bottom: 10px; // TODO: Use a spacing variable
margin-bottom: 10px; /* TODO: Use a spacing variable */
.mx_SettingsFlag_label {
vertical-align: middle;
display: inline-block;
max-width: calc(100% - $font-48px); // Force word wrap instead of colliding with the switch
max-width: calc(100% - $font-48px); /* Force word wrap instead of colliding with the switch */
box-sizing: border-box;
}

View file

@ -19,7 +19,7 @@ limitations under the License.
.mx_SettingsTab_subsectionText {
margin-block: $spacing-12 $spacing-32;
color: $primary-content; // Same as mx_SettingsTab
color: $primary-content; /* Same as mx_SettingsTab */
}
.mx_Field {

View file

@ -22,7 +22,7 @@ limitations under the License.
margin-top: 0;
}
// TODO: Make this selector less painful
/* TODO: Make this selector less painful */
.mx_GeneralUserSettingsTab_accountSection .mx_SettingsTab_subheading:nth-child(n + 1),
.mx_GeneralUserSettingsTab_discovery .mx_SettingsTab_subheading:nth-child(n + 2),
.mx_SetIdServer .mx_SettingsTab_subheading {
@ -31,7 +31,7 @@ limitations under the License.
.mx_GeneralUserSettingsTab_accountSection .mx_Spinner,
.mx_GeneralUserSettingsTab_discovery .mx_Spinner {
// Move the spinner to the left side of the container (default center)
/* Move the spinner to the left side of the container (default center) */
justify-content: left;
}

View file

@ -27,14 +27,14 @@ limitations under the License.
column-gap: $spacing-8;
margin-bottom: $spacing-4;
// TODO: Use flexbox
/* TODO: Use flexbox */
&:last-of-type {
margin-bottom: 0;
}
.mx_KeyboardShortcut {
flex-wrap: nowrap;
column-gap: 5px; // TODO: Use a spacing variable
column-gap: 5px; /* TODO: Use a spacing variable */
}
}
}

View file

@ -21,7 +21,7 @@ limitations under the License.
}
.mx_SettingsFlag {
margin-right: 0; // remove right margin to align with beta cards
margin-right: 0; /* remove right margin to align with beta cards */
align-items: center;
}
}