Skip to content

Stylelint: Another round of cleanup #43247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a061223
Undisable property-no-unknown
tbradsha Apr 24, 2025
150d4e0
Fix declaration-property-unit-allowed-list in VaultPress
tbradsha Apr 24, 2025
dce5533
Fix declaration-property-unit-allowed-list in CRM
tbradsha Apr 24, 2025
b7ed896
Fix declaration-property-unit-allowed-list in packages/forms
tbradsha Apr 24, 2025
45676de
Remove errant line
tbradsha Apr 24, 2025
21d2e2a
Comment-ignore remaining instances of declaration-property-unit-allow…
tbradsha Apr 24, 2025
2db1de8
Undisable declaration-property-unit-allowed-list
tbradsha Apr 24, 2025
bb6c05d
Ignore purposely-blank file
tbradsha Apr 24, 2025
ab5b571
Undisable scss/comment-no-empty
tbradsha Apr 24, 2025
813bfcb
Fix no-duplicate-selectors in CRM
tbradsha Apr 24, 2025
068aa64
Undisable no-duplicate-selectors
tbradsha Apr 25, 2025
a035858
Undisable scss/at-extend-no-missing-placeholder
tbradsha Apr 25, 2025
90c759b
Keep selector-id-pattern disabled
tbradsha Apr 25, 2025
da7bf14
Add changelogs
tbradsha Apr 25, 2025
e0f7bf4
Collapse class + placeholder instances into single selector group
tbradsha Apr 28, 2025
105c8dd
Update projects/packages/my-jetpack/_inc/components/onboarding-tour/s…
tbradsha Apr 28, 2025
325a1d7
Update projects/plugins/boost/app/assets/src/css/admin-banner.scss
tbradsha Apr 28, 2025
ecda0d1
Update projects/js-packages/components/components/boost-score-graph/s…
tbradsha Apr 28, 2025
a71986d
Update projects/packages/masterbar/src/admin-color-schemes/colors/_ov…
tbradsha Apr 28, 2025
77bc689
Update projects/packages/search/src/customberg/lib/wordpress-interfac…
tbradsha Apr 28, 2025
907288b
Update projects/packages/search/src/instant-search/components/search-…
tbradsha Apr 28, 2025
10d80e0
Preserve sectioning
tbradsha Apr 28, 2025
846a27a
Condense selector further
tbradsha Apr 28, 2025
64aae5a
Sectioning
tbradsha Apr 28, 2025
d4eae44
Preserve more sectioning
tbradsha Apr 28, 2025
05f0259
Merge branch 'trunk' into fix/stylelint/round_x_of_cleanup
tbradsha Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# Ignore CSS copied in from elsewhere
projects/js-packages/components/components/boost-score-graph/style-uplot.scss
projects/packages/jetpack-mu-wpcom/src/features/custom-css/custom-css/css/blank.css
projects/packages/jetpack-mu-wpcom/src/features/newspack-blocks/synced-newspack-blocks
projects/plugins/crm/css/lib
projects/plugins/crm/css/semantic-ui
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
.jetpack-ai-assistant__message-content {
flex-grow: 2;
margin: 0 8px;
// stylelint-disable-next-line declaration-property-unit-allowed-list -- this should be changed to a unitless value: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#values
line-height: 1.4em;
display: flex;
gap: 4px;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $white: #fff;
&__date {
font-size: 1em;
font-weight: 600;
// stylelint-disable-next-line declaration-property-unit-allowed-list -- this should be changed to a unitless value: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#values
line-height: 1.6em;
}

Expand All @@ -69,4 +70,4 @@ $white: #fff;
left: 50%;
transform: translateX(-50%);
}
}
}
20 changes: 7 additions & 13 deletions projects/js-packages/components/components/dot-pager/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@

.dot-pager__control-choose-page {
cursor: pointer;
border-radius: 50%;
width: 6px;
height: 6px;
padding: 0;
background-color: var(--jp-white-off);

&:disabled {
cursor: default;
Expand All @@ -58,14 +63,6 @@
&:focus-visible {
box-shadow: 0 0 0 2px var(--jp-gray-90);
}
}

.dot-pager__control-choose-page {
border-radius: 50%;
width: 6px;
height: 6px;
padding: 0;
background-color: var(--jp-white-off);

&:hover {
background-color: var(--jp-gray-20);
Expand All @@ -76,9 +73,6 @@
}
}

.dot-pager {

&__button {
margin-right: 10px;
}
.dot-pager__button {
margin-right: 10px;
}
19 changes: 8 additions & 11 deletions projects/js-packages/components/components/icon-tooltip/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ $arrow-color: var( --jp-gray );

// Namespace to avoid overriding global styles
.icon-tooltip-helper {
// POPOVER_HELPER_WIDTH
width: 124px;
height: 18px;
position: absolute;
top: 0;
// -( POPOVER_HELPER_WIDTH / 2 - iconSize / 2 ) + 'px'
left: -53px;
pointer-events: none;

/*
* Fix arrow placement - section start
Expand Down Expand Up @@ -71,17 +79,6 @@ $arrow-color: var( --jp-gray );
}
}

.icon-tooltip-helper {
// POPOVER_HELPER_WIDTH
width: 124px;
height: 18px;
position: absolute;
top: 0;
// -( POPOVER_HELPER_WIDTH / 2 - iconSize / 2 ) + 'px'
left: -53px;
pointer-events: none;
}

.icon-tooltip-container {
// Recover events
pointer-events: all;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
}
}

&.instagram {
fill: var( --color-instagram );
}

&.twitter {
fill: var( --color-twitter );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

&__body p {
font-weight: 400;
// stylelint-disable-next-line declaration-property-unit-allowed-list -- this should be changed to a unitless value: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#values
line-height: 1.6em;
font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@
margin-bottom: 25px;
}

.error {
margin-bottom: 25px;
}

.message {
margin-right: var( --spacing-base ); // 8px
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,6 @@
width: calc(100% - 48px); // Help with the margin on the row.
}

&__content{
background: var( --jp-white-off );
margin: 0;
padding: 2rem 1rem;
border-radius: 4px;
text-align: center;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

&__actions{
background: var( --jp-white );
padding: 2rem 0;
Expand Down Expand Up @@ -157,9 +144,19 @@
}
}

// When the screen height is shorter, hide the decorative cards to show the text and controls without scrolling.
.jp-connection__disconnect-dialog__content {

background: var( --jp-white-off );
margin: 0;
padding: 2rem 1rem;
border-radius: 4px;
text-align: center;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

// When the screen height is shorter, hide the decorative cards to show the text and controls without scrolling.
@media (max-height: 900px) {

.jp-components__decorative-card {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ $tablet-width: 760px;
.headline {
margin-bottom: 8px;
font-weight: 500;
// stylelint-disable-next-line declaration-property-unit-allowed-list -- this should be changed to a unitless value: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#values
line-height: 110%;
}

.paragraph {
// stylelint-disable-next-line declaration-property-unit-allowed-list -- this should be changed to a unitless value: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/#values
line-height: 140%;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
cursor: pointer;
}

.remove {
.remove, %remove {
position: absolute;
top: -4px;
right: -4px;
Expand Down Expand Up @@ -103,7 +103,7 @@

.remove-loading {

@extend .remove;
@extend %remove;
// This is to make the close button appear in the right place when we are loading the image.
// With this it is possible to close/stop loading images if the request takes too long.
top: -56px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
display: flex;
justify-content: center;
}

// Mastodon
.mastodon-preview {
max-width: 578px;
}
}

@media ( min-width: $break-small ) {
Expand All @@ -100,19 +105,9 @@
}

// Facebook

.facebook-preview {
width: 100%;
}

// Mastodon

.components-tab-panel__tab-content {

.mastodon-preview {
max-width: 578px;
}
}
}

// Modal containing the upgrade nudge
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@
display: flex;
align-items: center;
gap: 4px;
}

.branding {

.powered-by {
font-size: 12px;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ $light-gray-700: #c3c4c7;
$gray-original: #87a6bc;
$gray: desaturate( $gray-original, 100% ); // Intermediary transform to match dotcom's colors

// $gray color functions:
//
// lighten( $gray, 10% )
// lighten( $gray, 20% )
// lighten( $gray, 30% )
// darken( $gray, 10% )
// darken( $gray, 20% )
// darken( $gray, 30% )
//
// See wordpress.com/design-handbook/colors/ for more info.
/**
* $gray color functions:
*
* lighten( $gray, 10% )
* lighten( $gray, 20% )
* lighten( $gray, 30% )
* darken( $gray, 10% )
* darken( $gray, 20% )
* darken( $gray, 30% )
*
* See wordpress.com/design-handbook/colors/ for more info.
*/

$gray-light: lighten( $gray, 33% ); //#f6f6f6
$gray-dark: darken( $gray, 38% ); //#404040
Expand Down Expand Up @@ -57,4 +59,4 @@ $link-highlight: tint($blue-medium, 20%);
$white: rgba(255,255,255,1);
$transparent: rgba(255,255,255,0);

$border-ultra-light-gray: #e8f0f5;
$border-ultra-light-gray: #e8f0f5;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ Genericons
text-decoration: inherit;
vertical-align: top;
width: 1em;
}

/* Default */
.jetpack-social-navigation-genericons a::before {
/* Default */
content: "\f415";
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Linting: Do additional stylesheet cleanup.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.help-message {
display: flex;
font-size: 13px;
line-height: 1.4em;
line-height: 1.4;
margin-bottom: 1em;
margin-top: -0.5em;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@

// For some reason, when keeping the rule below together with the above selector,
// on production builds, the attributes are being reordered, causing side-effects
// stylelint-disable-next-line no-duplicate-selectors
.notched-label__notch {
border-left: none;
border-right: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,6 @@ input[type="submit"].button-primary:disabled {
color: #fff;
}

input[type="submit"].button-primary {
color: #fff;
}


/* ==========================================================================
** Inline editor styles
Expand Down
5 changes: 1 addition & 4 deletions projects/packages/forms/src/contact-form/css/file-field.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,13 @@

.jetpack-form-file-field__success {
color: #008A20;
display: none;
}

.jetpack-form-file-field__error {
color: #b32d2e;
}

.jetpack-form-file-field__success {
display: none;
}

.jetpack-form-file-field__preview.is-error .jetpack-form-file-field__uploading,
.jetpack-form-file-field__preview.is-complete .jetpack-form-file-field__uploading {
display: none;
Expand Down
1 change: 1 addition & 0 deletions projects/packages/forms/src/contact-form/css/grunion.css
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@
For some reason, when keeping the rule below together with the above selector,
on production builds, the attributes are being reordered, causing side-effects
*/
/* stylelint-disable-next-line no-duplicate-selectors*/
.contact-form .is-style-outlined .grunion-field-wrap .notched-label .notched-label__notch {
border-left: none;
border-right: none;
Expand Down
Loading
Loading