Skip to content
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

docs: enable stylelint declaration-block-no-duplicate-properties #16466

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/.stylelintrc.json
Expand Up @@ -7,7 +7,9 @@
"color-hex-case": null,
"custom-property-empty-line-before": null,
"custom-property-pattern": null,
"declaration-block-no-duplicate-properties": null,
"declaration-block-no-duplicate-properties": [true, {
"ignore": ["consecutive-duplicates-with-different-values"]
}],
"declaration-block-no-redundant-longhand-properties": null,
"declaration-block-no-shorthand-property-overrides": null,
"hue-degree-notation": null,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/scss/carbon-ads.scss
Expand Up @@ -15,9 +15,9 @@
padding: .6em;
font-size: 1rem;
overflow: hidden;
border-radius: 4px;
nschonni marked this conversation as resolved.
Show resolved Hide resolved
background-color: var(--body-background-color);
border: 1px solid var(--border-color);
border-radius: 4px;
border-radius: var(--border-radius);
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.1);

Expand Down
1 change: 0 additions & 1 deletion docs/src/assets/scss/components/search.scss
Expand Up @@ -65,7 +65,6 @@
.search .search-results {
font-size: .875rem;
background-color: var(--body-background-color);
position: relative;
z-index: 10;
width: 100%;
border-radius: 0 0 var(--border-radius) var(--border-radius);
Expand Down
2 changes: 0 additions & 2 deletions docs/src/assets/scss/forms.scss
Expand Up @@ -25,7 +25,6 @@

.label__text.label__text {
display: flex;
font-size: .875rem;
align-items: center;
gap: .5rem;
font-size: .875rem;
Expand All @@ -44,7 +43,6 @@ input {
font: inherit;
font-size: 1rem;
display: block;
line-height: 1.3;
min-width: 0;
line-height: 1.3;
max-width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/scss/languages.scss
Expand Up @@ -13,10 +13,10 @@

a {
color: inherit;
display: block;
width: 100%;
padding: .75rem .1rem;
text-decoration: none;
display: block;
display: flex;
Comment on lines +19 to 20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting 😂 we have both block and flex

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible for us to check which value takes precedence and gets applied?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed it might have been another Old IE thing, so I left it on the second pass.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think as a separate discussion, something like PostCSS might be able to calculate those variables as a build step based on a supported browser range. It's been awhile since I looked at that type of tooling though

align-items: center;
border-bottom: 1px solid var(--divider-color);
Expand Down
1 change: 0 additions & 1 deletion docs/src/assets/scss/syntax-highlighter.scss
Expand Up @@ -36,7 +36,6 @@ pre[class*="language-"] {
padding: 1.5rem;
margin: 1.5rem 0;
overflow: auto;
background-color: var(--color-neutral-50);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nzakas this was the only property removed that had a different value, as they both used variables, so I didn't see it as a fallback. The others with unique/fallback values were moved so they're side-by-side and configured to remove that style

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Thanks for the details.

border-radius: var(--border-radius);
background-color: var(--lightest-background-color);
color: var(--color-neutral-900);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/assets/scss/versions.scss
Expand Up @@ -14,10 +14,10 @@

a {
color: var(--link-color);
display: block;
width: 100%;
padding: 1rem .5rem;
text-decoration: none;
display: block;
display: flex;
align-items: center;
border-bottom: 1px solid var(--divider-color);
Expand Down