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

@ -29,23 +29,23 @@ limitations under the License.
}
.mx_RoomSublist_headerContainer {
// Create a flexbox to make alignment easy
/* Create a flexbox to make alignment easy */
display: flex;
align-items: center;
// ***************************
// Sticky Headers Start
/* *************************** */
/* Sticky Headers Start */
// Ideally we'd be able to use `position: sticky; top: 0; bottom: 0;` on the
// headerContainer, however due to our layout concerns we actually have to
// calculate it manually so we can sticky things in the right places. We also
// target the headerText instead of the container to reduce jumps when scrolling,
// and to help hide the badges/other buttons that could appear on hover. This
// all works by ensuring the header text has a fixed height when sticky so the
// fixed height of the container can maintain the scroll position.
/* Ideally we'd be able to use `position: sticky; top: 0; bottom: 0;` on the */
/* headerContainer, however due to our layout concerns we actually have to */
/* calculate it manually so we can sticky things in the right places. We also */
/* target the headerText instead of the container to reduce jumps when scrolling, */
/* and to help hide the badges/other buttons that could appear on hover. This */
/* all works by ensuring the header text has a fixed height when sticky so the */
/* fixed height of the container can maintain the scroll position. */
// The combined height must be set in the LeftPanel component for sticky headers
// to work correctly.
/* The combined height must be set in the LeftPanel component for sticky headers */
/* to work correctly. */
padding-bottom: 8px;
height: 24px;
color: $tertiary-content;
@ -58,51 +58,51 @@ limitations under the License.
flex: 1;
max-width: 100%;
// Create a flexbox to make ordering easy
/* Create a flexbox to make ordering easy */
display: flex;
align-items: center;
// We use a generic sticky class for 2 reasons: to reduce style duplication and
// to identify when a header is sticky. If we didn't have a consistent sticky class,
// we'd have to do the "is sticky" checks again on click, as clicking the header
// when sticky scrolls instead of collapses the list.
/* We use a generic sticky class for 2 reasons: to reduce style duplication and */
/* to identify when a header is sticky. If we didn't have a consistent sticky class, */
/* we'd have to do the "is sticky" checks again on click, as clicking the header */
/* when sticky scrolls instead of collapses the list. */
&.mx_RoomSublist_headerContainer_sticky {
position: fixed;
height: 32px; // to match the header container
// width set by JS because of a compat issue between Firefox and Chrome
height: 32px; /* to match the header container */
/* width set by JS because of a compat issue between Firefox and Chrome */
width: calc(100% - 15px);
}
// We don't have a top style because the top is dependent on the room list header's
// height, and is therefore calculated in JS.
// The class, mx_RoomSublist_headerContainer_stickyTop, is applied though.
/* We don't have a top style because the top is dependent on the room list header's */
/* height, and is therefore calculated in JS. */
/* The class, mx_RoomSublist_headerContainer_stickyTop, is applied though. */
}
// Sticky Headers End
// ***************************
/* Sticky Headers End */
/* *************************** */
.mx_RoomSublist_badgeContainer {
// Create another flexbox row because it's super easy to position the badge this way.
/* Create another flexbox row because it's super easy to position the badge this way. */
display: flex;
align-items: center;
justify-content: center;
// Apply the width and margin to the badge so the container doesn't occupy dead space
/* Apply the width and margin to the badge so the container doesn't occupy dead space */
.mx_NotificationBadge {
// Do not set a width so the badges get properly sized
margin-left: 8px; // same as menu+aux buttons
/* Do not set a width so the badges get properly sized */
margin-left: 8px; /* same as menu+aux buttons */
}
}
&:not(.mx_RoomSublist_headerContainer_withAux) {
.mx_NotificationBadge {
margin-right: 4px; // just to push it over a bit, aligning it with the other elements
margin-right: 4px; /* just to push it over a bit, aligning it with the other elements */
}
}
.mx_RoomSublist_auxButton,
.mx_RoomSublist_menuButton {
margin-left: 8px; // should be the same as the notification badge
margin-left: 8px; /* should be the same as the notification badge */
position: relative;
width: 24px;
height: 24px;
@ -127,7 +127,7 @@ limitations under the License.
background: $panel-actions;
}
// Hide the menu button by default
/* Hide the menu button by default */
.mx_RoomSublist_menuButton {
visibility: hidden;
width: 0;
@ -144,12 +144,12 @@ limitations under the License.
.mx_RoomSublist_headerText {
flex: 1;
max-width: calc(100% - 16px); // 16px is the badge width
max-width: calc(100% - 16px); /* 16px is the badge width */
line-height: $font-16px;
font-size: $font-13px;
font-weight: 600;
// Ellipsize any text overflow
/* Ellipsize any text overflow */
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@ -180,10 +180,10 @@ limitations under the License.
}
}
// In the general case, we reserve space for each sublist header to prevent
// scroll jumps when they become sticky. However, that leaves a gap when
// scrolled to the top above the first sublist (whose header can only ever
// stick to top), so we make sure to exclude the first visible sublist.
/* In the general case, we reserve space for each sublist header to prevent */
/* scroll jumps when they become sticky. However, that leaves a gap when */
/* scrolled to the top above the first sublist (whose header can only ever */
/* stick to top), so we make sure to exclude the first visible sublist. */
&:not(.mx_RoomSublist_hidden) ~ .mx_RoomSublist .mx_RoomSublist_stickableContainer {
height: 24px;
}
@ -191,7 +191,7 @@ limitations under the License.
.mx_RoomSublist_resizeBox {
position: relative;
// Create another flexbox column for the tiles
/* Create another flexbox column for the tiles */
display: flex;
flex-direction: column;
overflow: hidden;
@ -200,23 +200,23 @@ limitations under the License.
flex: 1 0 0;
overflow: hidden;
overflow: clip;
// need this to be flex otherwise the overflow hidden from above
// sometimes vertically centers the clipped list ... no idea why it would do this
// as the box model should be top aligned. Happens in both FF and Chromium
/* need this to be flex otherwise the overflow hidden from above */
/* sometimes vertically centers the clipped list ... no idea why it would do this */
/* as the box model should be top aligned. Happens in both FF and Chromium */
display: flex;
flex-direction: column;
align-self: stretch;
// without this Firefox will prefer pushing the resizer & show more/less button into the overflow
/* without this Firefox will prefer pushing the resizer & show more/less button into the overflow */
min-height: 0;
mask-image: linear-gradient(0deg, transparent, black 4px);
}
&.mx_RoomSublist_resizeBox_forceExpanded .mx_RoomSublist_tiles {
// in this state the div can collapse its height entirely in Chromium,
// so prevent that by allowing overflow
/* in this state the div can collapse its height entirely in Chromium, */
/* so prevent that by allowing overflow */
overflow: visible;
// clear the min-height to make it not collapse entirely in a state with no active resizer
/* clear the min-height to make it not collapse entirely in a state with no active resizer */
min-height: unset;
}
@ -231,20 +231,20 @@ limitations under the License.
width: 100%;
}
// Class name comes from the ResizableBox component
// The hover state needs to use the whole sublist, not just the resizable box,
// so that selector is below and one level higher.
/* Class name comes from the ResizableBox component */
/* The hover state needs to use the whole sublist, not just the resizable box, */
/* so that selector is below and one level higher. */
.mx_RoomSublist_resizerHandle {
cursor: ns-resize;
border-radius: 3px;
// Override styles from library
/* Override styles from library */
max-width: 64px;
height: 4px !important; // Update RESIZE_HANDLE_HEIGHT if this changes
height: 4px !important; /* Update RESIZE_HANDLE_HEIGHT if this changes */
// This is positioned directly below the 'show more' button.
/* This is positioned directly below the 'show more' button. */
position: relative !important;
bottom: 0 !important; // override from library
bottom: 0 !important; /* override from library */
}
&:hover, &.mx_RoomSublist_hasMenuOpen {
@ -261,12 +261,12 @@ limitations under the License.
line-height: $font-18px;
color: $secondary-content;
// Update the render() function for RoomSublist if these change
// Update the ListLayout class for minVisibleTiles if these change.
/* Update the render() function for RoomSublist if these change */
/* Update the ListLayout class for minVisibleTiles if these change. */
height: 24px;
padding-bottom: 4px;
// We create a flexbox to cheat at alignment
/* We create a flexbox to cheat at alignment */
display: flex;
align-items: center;
@ -280,7 +280,7 @@ limitations under the License.
mask-size: contain;
mask-repeat: no-repeat;
background: $tertiary-content;
left: -1px; // adjust for image position
left: -1px; /* adjust for image position */
}
.mx_RoomSublist_showMoreButtonChevron,
@ -323,9 +323,9 @@ limitations under the License.
.mx_RoomSublist_auxButton {
order: 2;
visibility: visible;
width: 32px !important; // !important to override hover styles
height: 32px !important; // !important to override hover styles
margin-left: 0 !important; // !important to override hover styles
width: 32px !important; /* !important to override hover styles */
height: 32px !important; /* !important to override hover styles */
margin-left: 0 !important; /* !important to override hover styles */
background-color: $panel-actions;
margin-top: 8px;
@ -344,7 +344,7 @@ limitations under the License.
flex-direction: column;
.mx_RoomSublist_showNButtonChevron {
margin-right: 12px; // to center
margin-right: 12px; /* to center */
}
}
@ -357,15 +357,15 @@ limitations under the License.
.mx_RoomSublist_menuButton {
visibility: visible;
position: absolute;
bottom: 48px; // align to middle of name, 40px for aux button (with padding) and 8px for alignment
bottom: 48px; /* align to middle of name, 40px for aux button (with padding) and 8px for alignment */
right: 0;
width: 16px;
height: 16px;
border-radius: 0;
z-index: 1; // occlude the list name
z-index: 1; /* occlude the list name */
// This is the same color as the left panel background because it needs
// to occlude the sublist title
/* This is the same color as the left panel background because it needs */
/* to occlude the sublist title */
background-color: $roomlist-bg-color;
&::before {
@ -376,7 +376,7 @@ limitations under the License.
&.mx_RoomSublist_headerContainer:not(.mx_RoomSublist_headerContainer_withAux) {
.mx_RoomSublist_menuButton {
bottom: 8px; // align to the middle of name, 40px less than the `bottom` above.
bottom: 8px; /* align to the middle of name, 40px less than the `bottom` above. */
}
}
}
@ -390,7 +390,7 @@ limitations under the License.
hr {
margin-top: 16px;
margin-bottom: 16px;
margin-right: 16px; // additional 16px
margin-right: 16px; /* additional 16px */
border: 1px solid $primary-content;
opacity: 0.1;
}
@ -427,6 +427,6 @@ limitations under the License.
}
.mx_RoomSublist_minimized .mx_RoomSublist_skeletonUI {
width: 32px; // cut off the horizontal lines in the svg
margin-left: 10px; // align with sublist + buttons
width: 32px; /* cut off the horizontal lines in the svg */
margin-left: 10px; /* align with sublist + buttons */
}