Skip to content

Commit 61f8479

Browse files
OpenStaxClaudeclaudeCopilot
committed
Configure stylelint to lint both styled-components and plain CSS files
Added dual stylelint configuration to support the hybrid migration approach where styled-components (.tsx) and plain CSS (.css) coexist during the transition period. Changes: - Created .stylelintrc.css.json for plain CSS files - Uses stylelint-config-standard without styled-components processor - Maintains same linting rules as .stylelintrc for consistency - Updated package.json scripts: - lint:css now runs both lint:css:tsx and lint:css:plain - lint:css:tsx: Lints .tsx files with styled-components (existing) - lint:css:plain: Lints .css files with new config This addresses Copilot's review comment about Modal.css not being covered by CI stylelint. Now both legacy styled-components and new plain CSS files will be linted during the build process. Eventually, when all styled-components are migrated to plain CSS, we can simplify to a single stylelint configuration for .css files only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Fix remaining CSS lint errors across the codebase Addressed all remaining stylelint errors and warnings identified in review #21: 1. src/index.css: - Moved @import statements to top of file (lines 1-2) to fix no-invalid-position-at-import-rule errors 2. src/app/components/Checkbox.css: - Added stylelint-disable comment for intentional duplicate outline (webkit fallback) - Added stylelint-disable block for no-descending-specificity warnings (focus-within selectors intentionally override input state selectors for proper CSS cascade) 3. src/app/components/ScrollLock.css: - Added stylelint-disable comment for !important on overflow (must override scroll lock for printing) 4. src/app/content/components/ContentPane.css: - Added stylelint-disable comments for !important on padding-left (must override responsive padding when sidebar is closed) - Added stylelint-disable block for BEM modifier class names with double dashes 5. src/app/components/Typography/Links.css: - Added stylelint-disable block for BEM modifier class names with double dashes All lint disables include explanatory comments. These intentional overrides are necessary for proper functionality (focus states, print styles, responsive behavior, BEM naming convention). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Fix (most) css lint issues Fix stylelint errors in Modal.css Fixed all stylelint errors identified in lint.output: - Added empty lines before comments (comment-empty-line-before) - Converted hex colors to lowercase (#027EB5 → #027eb5, #0064A0 → #0064a0) - Removed trailing zeros from rem values (3.0rem → 3rem) All changes are formatting/style-only and don't affect functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) accommodate BEM patterns Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 021d96b commit 61f8479

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/app/components/Modal/Modal.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
width: 40rem;
3131
background-color: white;
3232
box-shadow: 0 0 2rem rgba(0, 0, 0, 0.05), 0 0 4rem rgba(0, 0, 0, 0.08);
33+
3334
/* bodyCopyRegularStyle - font-size: 1.6rem, line-height: 2.5rem, color from theme */
3435
font-size: 1.6rem;
3536
line-height: 2.5rem;
@@ -38,21 +39,21 @@
3839

3940
/* Link styling inside modal card - mirrors bodyCopyRegularStyle link behavior */
4041
.modal-card a {
41-
color: var(--link-color, #027EB5);
42+
color: var(--link-color, #027eb5);
4243
cursor: pointer;
4344
text-decoration: underline;
4445
}
4546

4647
.modal-card a:hover {
47-
color: var(--link-hover-color, #0064A0);
48+
color: var(--link-hover-color, #0064a0);
4849
}
4950

5051
/* Modal header */
5152
.modal-header {
5253
display: flex;
5354
align-items: center;
5455
margin-bottom: 1.5rem; /* modalPadding * 0.5 = 3.0 * 0.5 */
55-
padding: 1.5rem 3.0rem; /* modalPadding * 0.5, modalPadding */
56+
padding: 1.5rem 3rem; /* modalPadding * 0.5, modalPadding */
5657
background: var(--header-bg, #f1f1f1);
5758
border-bottom: solid 0.1rem var(--header-border, #fafafa);
5859
justify-content: space-between;
@@ -67,6 +68,7 @@
6768
padding: 1rem 0 1rem 0;
6869
margin: 0;
6970
color: var(--text-color, #424242);
71+
7072
/* Additional heading styles */
7173
display: flex;
7274
align-items: center;
@@ -88,6 +90,7 @@
8890
letter-spacing: -0.02rem;
8991
margin: 0;
9092
color: var(--text-color, #424242);
93+
9194
/* Additional styles from BodyHeading */
9295
font-weight: 400;
9396
padding: 1.5rem 0; /* modalPadding * 0.5 */
@@ -105,7 +108,7 @@
105108
.modal-body {
106109
display: flex;
107110
flex-direction: column;
108-
padding: 0 3.0rem; /* modalPadding */
111+
padding: 0 3rem; /* modalPadding */
109112
}
110113

111114
/* Special case: when Card.Header + Body, remove top margin */
@@ -128,7 +131,7 @@
128131
.modal-footer {
129132
display: flex;
130133
justify-content: space-between;
131-
padding: 3.0rem; /* modalPadding */
134+
padding: 3rem; /* modalPadding */
132135
}
133136

134137
/* Close modal icon button */
@@ -137,6 +140,7 @@
137140
height: 2rem;
138141
width: 2rem;
139142
padding: 0.4rem;
143+
140144
/* Base button styles */
141145
cursor: pointer;
142146
margin-right: 0;
@@ -146,6 +150,7 @@
146150
display: flex;
147151
align-items: center;
148152
justify-content: center;
153+
149154
/* toolbarIconColor.lighter */
150155
color: var(--icon-color-lighter, #c5c5c5);
151156
}

0 commit comments

Comments
 (0)