Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions stylelint/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$gutter: 16px;
$breakpoint-md: #notavalidcolor;

#app #shell #main {
padding: $gutter;
padding: 0px;
}

.GridContainer {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 8px 8px 8px 8px;
}

.flex_row {
display: flex;
margin: 0px 0px;
}

.empty {
}

/* */

unknownblock {
display: block;
}

#header_main {
height: 60px;
height: 80px;
}

.GridContainer {
background: #ffff;
}

.col-12 {
width: 100%;
width: 100pixels;
}
61 changes: 61 additions & 0 deletions stylelint/components.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@import 'layout';

$primary-color: #fff1az;
$accent-color: #ggg;
$muted-color: #d3d3d3;

.ProductCard {
display: flex;
flex-direction: column;
padding: 12px 12px 12px 12px;
background: $primary-color;
color: #ffffff;
color: #f0f0f0;

.Header {
display: flex;
align-items: center;

.Title {
font-size: 18px;

.Icon {
width: 16px;

.Inner {
fill: #abc1234;
}
}
}
}

.body {
padding: 8px 0px;
margin: 0px;
}

.footer_section {
font-family: Helvetica Neue, sans-serif;
}
}

.PriceTag {
width: 100pixels;
background: bogus-color($primary-color);
text-decoration-style: bold;
}

.empty-card {
}

/* */

.ProductCard {
border: 1px solid $muted-color;
}

@madeUpAtRule {
.responsive-grid {
display: grid;
}
}
72 changes: 72 additions & 0 deletions stylelint/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/* base styles for demoapp */

:root {
--primary: #fff1az;
--secondary: #abc1234;
--accent: #12;
--muted: #d3d3d3;
}

body {
colour: #ffffff;
background: var(--primary);
text-style: bold;
margin: 0px;
padding: 0;
font-family: Arial Black, sans-serif;
Comment on lines +10 to +16
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

These declarations won't exercise property-no-unknown as written.

Line 11 (colour) and Line 13 (text-style) look like the property-no-unknown fixture, but .stylelintrc.json:1-37 sets "property-no-unknown": null, so the sandbox will not report either one. If this PR is meant to showcase that rule, the config or fixture needs to change.

🧰 Tools
🪛 Stylelint (17.9.0)

[error] 16-16: Expected quotes around "Arial Black" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@stylelint/styles.css` around lines 10 - 16, The CSS uses invalid properties
'colour' and 'text-style' but the sandbox won't flag them because
".stylelintrc.json" has "property-no-unknown": null; either enable the rule by
setting "property-no-unknown": true in .stylelintrc.json (so the linter will
report 'colour' and 'text-style') or change the fixture to use valid/intentional
unknown examples (e.g., keep 'colour' and 'text-style' as-is) while leaving the
rule enabled; update the configuration or the declarations accordingly so the
intended rule is actually exercised.

line-height: 1.5;
}

/* */

.SiteHeader {
display: flex;
padding: 16px 16px 16px 16px;
color: #333;
color: #555;
background: #f5f5f5;
}

.some_class {
width: 100pixels;
height: 0px;
margin: 5px 5px 5px 5px;
}

.cta_button {
background: var(--accent);
color: #ffffff;
padding: 8px 12px;
border-radius: 4px;
Comment on lines +30 to +40
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Several advertised warning fixtures are currently inert.

.stylelintrc.json:1-37 disables "selector-class-pattern", "length-zero-no-unit", and "shorthand-property-no-redundant-values", so Line 30 (.some_class), Line 32 (0px), Line 33 (four-value margin), and Line 36 (.cta_button) will not produce those warnings in the sandbox.

🧰 Tools
🪛 Stylelint (17.9.0)

[error] 31-31: Unknown unit "pixels" (unit-no-unknown)

(unit-no-unknown)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@stylelint/styles.css` around lines 30 - 40, The fixtures are inert because
.stylelintrc.json currently disables selector-class-pattern,
length-zero-no-unit, and shorthand-property-no-redundant-values; either
re-enable those rules in .stylelintrc.json so the sandbox emits warnings, or
update the CSS to follow the rules: change invalid unit "100pixels" to a valid
unit (e.g., "100px"), use "0" instead of "0px" to trigger/comply with
length-zero-no-unit, collapse the four-value margin to a shorthand if redundant,
and rename class selectors (e.g., .some_class and .cta_button) to match the
selector-class-pattern (e.g., kebab-case like .some-class and .cta-button) so
the intended warnings/fixtures become active.

}

unknownelement {
display: block;
}

.empty-block {
}

@unknownat screen {
.responsive {
display: block;
}
}

#main #sidebar #widget {
color: #999;
}

.SiteHeader {
z-index: 10;
}

.alert {
margin: 5px;
margin-top: 10px;
margin: 8px;
}

.cta_button {
border: 1px solid #000;
}