You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _includes/markdown/CSS.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ There are countless ways to organize your CSS styles. From naming conventions to
12
12
13
13
***Assume intent.** Always operate under the assumption that existing patterns or conventions were created for a reason. Stick to the existing conventions, even if they feel unfamiliar or inefficient at first glance—dig deeper to understand the context. Continuity is critical for maintainability and teamwork.
14
14
***Learn before you suggest.** When you join a project, take the time to understand how the styles are organized and why they're structured that way. Avoid making snap judgments or introducing changes before fully grasping the system.
15
-
***When in doubt, align with technical leadership**. If you are unsure about patterns or systems to adhere to, follow the guidance and recommendations of a project's technical leadership (where feasible).
15
+
***When in doubt, align with technical leadership.** If you are unsure about patterns or systems to adhere to, follow the guidance and recommendations of a project's technical leadership (where feasible).
16
16
17
17
Only propose changes if the current convention is genuinely problematic, e.g., if it’s inconsistent, hard to scale, or causes errors. When you suggest a change, be ready to explain why the new approach is better and how it solves a specific problem.
18
18
@@ -254,7 +254,7 @@ Begin with base styles that affect the entire application:
254
254
255
255
### Elements
256
256
257
-
This layer targets raw HTML elements (tags), without using classes, IDs, or other specific selectors. The purpose of the Base level is to establish foundational styles for elements to be used within components later on.
257
+
This layer targets raw HTML elements (tags), without using classes, IDs, or other specific selectors. The purpose of the Elements level is to establish foundational styles for elements to be used within components later on.
258
258
259
259
Below are some examples of styles at this level:
260
260
@@ -311,9 +311,9 @@ Utility classes provide quick, reusable styling solutions for common, single-pur
311
311
312
312
#### Key Guidelines
313
313
314
-
***Single Responsibility:** Each utility class should only do one thing. For example, is-style-h1 should only apply styles required to make the text appear as heading level 1 and do nothing else.
314
+
***Single Responsibility:** Each utility class should only do one thing. For example, the is-style-h1 class should only apply the styles required to make the text appear as heading level 1 and do nothing else.
315
315
316
-
***Specificity Level:** Utility classes sit at the top of the inverted triangle architecture, so they can have higher specificity than base styles and components. In practice, they usually have the same level of specificity as components, because of that they should be applied after the component class.
316
+
***Specificity Level:** Utility classes sit at the top of the inverted triangle architecture, so they can have higher specificity than base styles and components. In practice, they usually have the same level of specificity as components, because of that, they should be applied after the component class.
317
317
318
318
***Consistency:** Like global variables, utility classes help maintain consistency throughout the app. By standardizing common patterns like text alignment, padding, or display properties, you reduce the risk of divergent styles across components.
319
319
@@ -484,7 +484,7 @@ Instead, define the margin outside of the component:
484
484
485
485
```css
486
486
/* Context-specific spacing */
487
-
.card-grid>*{
487
+
.card-grid {
488
488
display: grid;
489
489
grid-template-columns: ...
490
490
row-gap: 1.5rem; /* ✅ Do this instead */
@@ -566,7 +566,7 @@ When introducing a new feature, think about the experience a user will get if th
566
566
567
567
### 1. Check Browser Compatibility
568
568
569
-
In 2023, Google introduced Baseline to help developers determine whether certain features or APIs are safe to use in production. This tool aids in understanding the stability and support of web features across the most recent two versions of major browsers: Safari, Firefox, Chrome and Edge.
569
+
In 2023, Google introduced Baseline to help developers determine whether certain features or APIs are safe to use in production. This tool aids in understanding the stability and support of web features across the most recent two versions of major browsers: Safari, Firefox, Chrome, and Edge.
570
570
571
571
* Use [Can I Use](https://caniuse.com/) (backed by Google Baseline) to see which browsers support a feature.
0 commit comments