Skip to content

Commit d8d91c0

Browse files
committed
docs: update references to scss
1 parent 055a5aa commit d8d91c0

File tree

7 files changed

+34
-35
lines changed

7 files changed

+34
-35
lines changed

.cursor/rules/design.mdc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Design system and UI consistency guidelines for Label Studio
3-
globs: **/*.tsx,**/*.jsx,**/*.scss,**/*.css
3+
globs: **/*.tsx,**/*.jsx,**/*.css
44
alwaysApply: false
55
---
66

@@ -51,7 +51,7 @@ This rule provides guidance for creating user interfaces consistent with the Hum
5151

5252
## Design Tokens
5353

54-
**Location**: `web/libs/ui/src/tokens/tokens.scss`
54+
**Location**: `web/libs/ui/src/tokens/tokens.prefix.css`
5555

5656
**Always Use Semantic Tokens**:
5757

@@ -143,9 +143,9 @@ import { cn } from '@humansignal/core';
143143
<div className="p-200 bg-grape-600 text-16">
144144
```
145145

146-
**SCSS Modules** (co-located `.module.scss`):
147-
```scss
148-
// Create component tokens → semantic tokens
146+
**CSS Modules** (co-located `.module.css`):
147+
```css
148+
/* Component tokens → semantic tokens */
149149
.component {
150150
--component-bg: var(--color-neutral-surface);
151151
--component-text: var(--color-neutral-content);
@@ -156,7 +156,7 @@ import { cn } from '@humansignal/core';
156156
padding: var(--component-spacing);
157157
}
158158

159-
// Variant pattern
159+
/* Variant pattern */
160160
.variant-primary {
161161
--component-bg: var(--color-primary-surface);
162162
--component-text: var(--color-primary-surface-content);
@@ -187,7 +187,7 @@ See `react.mdc` for complete React patterns.
187187
```
188188
button/
189189
button.tsx
190-
button.module.scss
190+
button.module.css
191191
button.stories.tsx
192192
button.test.tsx
193193
index.ts
@@ -196,7 +196,7 @@ button/
196196
**Pattern**:
197197
```tsx
198198
import { forwardRef } from 'react';
199-
import styles from './button.module.scss';
199+
import styles from './button.module.css';
200200
import { cn } from '@humansignal/core';
201201

202202
export interface ButtonProps {
@@ -315,7 +315,7 @@ export const Primary: Story = {
315315

316316
**Files**:
317317
- Components: `web/libs/ui/src/lib/`
318-
- Tokens: `web/libs/ui/src/tokens/tokens.scss`
318+
- Tokens: `web/libs/ui/src/tokens/tokens.prefix.css`
319319
- Storybook: `yarn nx storybook storybook`
320320

321321
**Related Rules**:

.cursor/rules/react.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ globs: **/*.jsx,**/*.tsx
3131
```
3232
component-name/
3333
component-name.tsx
34-
component-name.module.scss
34+
component-name.module.css
3535
component-name.test.tsx
3636
index.ts
3737
```
@@ -64,7 +64,7 @@ globs: **/*.jsx,**/*.tsx
6464

6565
## Tooling
6666
- Use Biome for code linting and formatting
67-
- Follow CSS/SCSS linting rules defined in .stylelintrc.json
67+
- Follow CSS linting rules defined in biome.json (css section)
6868
- Use TypeScript for type safety
6969
- Keep bundle size in check by monitoring imports
7070

@@ -104,7 +104,7 @@ globs: **/*.jsx,**/*.tsx
104104
## Code Organization
105105
- Use proper file naming conventions which is kebab-case ie. ListItem -> `list-item.tsx`
106106
- Prefer one component per folder, but group related components together when necessary, and ensure there is only one component per file.
107-
- Component folders should have a SCSS `.module.scss` with the name of the component kebab-case ie. ListItem -> `list-item.module.scss`
107+
- Component folders should have a CSS `.module.css` with the name of the component kebab-case ie. ListItem -> `list-item.module.css`
108108
- Implement proper directory structure
109109
- UI components live within `web/libs/ui`
110110
- Application components that are shared across applications such as certain page-level blocks live within `web/libs/app-common`

.cursor/rules/tailwind.mdc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
description: Tailwind CSS and UI component best practices for the LabelStudio clientside application
3-
globs: **/*.css,tailwind.config.ts,tailwind.config.js,**/*.scss,**/*.tsx,**/*.jsx
3+
globs: **/*.css,tailwind.config.ts,tailwind.config.js,**/*.tsx,**/*.jsx
44
---
55

66
# Tailwind CSS Best Practices
77

88
## Component Styling
99
- Use utility classes over custom CSS
1010
- Group related utilities with @apply when needed
11-
- Use custom component styles as a SCSS module only when necessary to improve the readability and maintainability of the components
11+
- Use custom component styles as a CSS module only when necessary to improve the readability and maintainability of the components
1212
- Use proper responsive design utilities
1313
- Use proper state variants
1414
- Keep component styles consistent
1515

1616
## Tokens
17-
- All tokens from Figma are programatically generated and defined in the `web/libs/ui/src/tokens/tokens.scss` file
17+
- All tokens from Figma are programatically generated and defined in the `web/libs/ui/src/tokens/tokens.prefix.css` file
1818
- Tokens can be regenerated by exporting from Figma using the plugin `Figma Variable Exporter` and replacing the contents of `web/design-tokens.json` with the newly exported json file then using the `cd web/ && yarn design-tokens` command
1919
- When regenerating tokens, ensure that the project root level `make fmt-all` command is run to ensure all the files are linted and formatted properly
20-
- Do not use any of the tokens not defined through the Figma Variable Exporter plugin and established in the `web/libs/ui/src/tokens/tokens.scss` file
20+
- Do not use any of the tokens not defined through the Figma Variable Exporter plugin and established in the `web/libs/ui/src/tokens/tokens.prefix.css` file
2121
- Do not use any of the default tailwind css classes, only use the ones defined through the `web/libs/ui/src/tokens/tokens.js` file
2222

2323
## Layout

DESIGN.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ For domain terminology (Project, Task, Annotation, etc.), see `terminology.mdc`
9797

9898
## Design Tokens
9999

100-
**Location**: `web/libs/ui/src/tokens/tokens.scss`
100+
**Location**: `web/libs/ui/src/tokens/tokens.prefix.css`
101101

102102
**Always use semantic tokens** instead of numeric values:
103103

@@ -118,27 +118,27 @@ For domain terminology (Project, Task, Annotation, etc.), see `terminology.mdc`
118118
- **Accent**: Decorative colors (grape, blueberry, kale, kiwi, mango, canteloupe, persimmon, plum, fig, sand)
119119

120120
**Color Token Structure**:
121-
```scss
122-
// Surface colors (for backgrounds of interactive elements)
121+
```css
122+
/* Surface colors (for backgrounds of interactive elements) */
123123
--color-primary-surface
124124
--color-primary-surface-hover
125125
--color-primary-surface-active
126126

127-
// Content colors (for text)
127+
/* Content colors (for text) */
128128
--color-neutral-content
129129
--color-neutral-content-subtle
130130
--color-neutral-content-subtler
131-
--color-neutral-content-subtlest // Use for disabled text
131+
--color-neutral-content-subtlest /* Use for disabled text */
132132

133-
// Background colors (for page/container backgrounds)
133+
/* Background colors (for page/container backgrounds) */
134134
--color-neutral-background
135135
--color-primary-background
136136

137-
// Border colors
137+
/* Border colors */
138138
--color-neutral-border
139139
--color-primary-border-subtle
140140

141-
// Icon colors
141+
/* Icon colors */
142142
--color-primary-icon
143143
--color-negative-icon
144144
```
@@ -225,12 +225,12 @@ See `tailwind.mdc` for complete guidelines.
225225

226226
**Responsive**: `sm:`, `md:`, `lg:` utilities
227227

228-
### SCSS Modules
228+
### CSS Modules
229229

230-
Co-locate `.module.scss` with components.
230+
Co-locate `.module.css` with components.
231231

232232
**Component Tokens Pattern**:
233-
```scss
233+
```css
234234
.base {
235235
--background-color: var(--color-primary-surface);
236236
--text-color: var(--color-primary-surface-content);
@@ -244,7 +244,7 @@ Co-locate `.module.scss` with components.
244244
}
245245
```
246246

247-
**Tailwind in SCSS**: `@apply flex items-center gap-tight;`
247+
**Tailwind in CSS**: `@apply flex items-center gap-tight;`
248248

249249
**Canvas Elements**:
250250

@@ -265,7 +265,7 @@ See `react.mdc` for complete React patterns.
265265

266266
- `@humansignal/ui` components: kebab-case (`button.tsx`, `empty-state.tsx`)
267267
- Application components: PascalCase acceptable (`DataManager.tsx`)
268-
- Co-locate: `.tsx`, `.module.scss`, `.stories.tsx`, `.test.tsx`
268+
- Co-locate: `.tsx`, `.module.css`, `.stories.tsx`, `.test.tsx`
269269
- Every component must have Storybook stories
270270

271271
---
@@ -338,7 +338,7 @@ Before creating new components, check `@humansignal/ui` and Storybook.
338338
Never hard-code values. Use semantic tokens: `text-primary-content p-tight text-body-medium`
339339

340340
Create component tokens:
341-
```scss
341+
```css
342342
.component {
343343
--component-bg: var(--color-neutral-surface);
344344
background: var(--component-bg);
@@ -393,7 +393,7 @@ Exceptions: draft content, preferences, immediate toggles.
393393
### Key Files
394394

395395
- Components: `web/libs/ui/src/lib/`
396-
- Tokens: `web/libs/ui/src/tokens/tokens.scss`
396+
- Tokens: `web/libs/ui/src/tokens/tokens.prefix.css`
397397
- Icons: `@humansignal/icons`
398398
- Storybook: `yarn nx storybook storybook`
399399

web/.stylelintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

web/libs/frontend-test/src/cypress/support/e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "@cypress/code-coverage/support";
66
// Output spec steps
77
require("cypress-terminal-report/src/installLogsCollector")({
88
filterLog: ([type, message]: [string, string]) => {
9-
// Suppress noisy webpack-dev-server / Sass deprecation warnings
9+
// Suppress noisy webpack-dev-server warnings
1010
if (type === "cons:warn" && typeof message === "string" && message.includes("[webpack-dev-server]")) {
1111
return false;
1212
}

web/libs/ui/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ This will automatically generate a scaffold of the following:
4040

4141
1. Perform the same step to creating a component for the component in question, continuing with the theme we'll use `Button` as an example.
4242

43-
2. Find all current definitions within the project that would require to be replaced, take the consolidated version of the existing component and place the current SCSS and TSX within the generated file equivalents from the previous step. (NOTE: Ensure to keep the new SCSS module styles import, replacing the old one that may have been copied over)
43+
2. Find all current definitions within the project that would require to be replaced, take the consolidated version of the existing component and place the current CSS and TSX within the generated file equivalents from the previous step. (NOTE: Ensure to keep the new CSS module styles import, replacing the old one that may have been copied over)
4444

4545
3. Remove any `bem.tsx` imports
4646

4747
4. Replace the BEM components used with standard jsx tags.
4848

49-
5. Add the className's from the SCSS module styles object based on the same BEM structure previously found. (NOTE: Ensure that conditionals/modifiers are handled correctly)
49+
5. Add the className's from the CSS module styles object based on the same BEM structure previously found. (NOTE: Ensure that conditionals/modifiers are handled correctly)
5050

5151
6. Add the component stories to the generated `button.stories.tsx` file.
5252

0 commit comments

Comments
 (0)