Skip to content

Commit 27d68db

Browse files
authored
Merge pull request #14 from NewDesignFile/feature
feat:Optimizations
2 parents 7b793ed + 8e01183 commit 27d68db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1517
-2570
lines changed

README.md

Lines changed: 31 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Dark warm | `dark--warm`
3636
Dark cold | `dark--cold`
3737

3838

39-
#### Usage guide
39+
#### Utility classes, naming convention
4040
- All classes associated with the New UI are prefixed with a global namespace followed by a hyphen: `nu-`
4141
- In addition to a global namespace, we added prefixes to each class to make it more apparent what job that class is doing using BEM syntax.
4242
- `c-` for UI components.
@@ -47,7 +47,7 @@ Dark cold | `dark--cold`
4747

4848
---
4949

50-
### Design Tokens & Primitives
50+
### Design tokens
5151

5252
#### Colors
5353

@@ -76,14 +76,6 @@ Button | Role
7676
**`--button-active`** | Primary button active
7777
**`--button-disabled`** | Disabled button background
7878

79-
Icon | Role
80-
:--- | :---
81-
**`--icon-primary`** | Primary icons
82-
**`--icon-secondary`** | Secondary icons
83-
**`--icon-disabled`** | Disabled icons
84-
**`--icon-on-color`** | Icon on interactive colors
85-
**`--icon-inked`** | Inked icons
86-
8779
Link | Role
8880
:--- | :---
8981
**`--link`** | Primary link
@@ -98,16 +90,16 @@ Support | Role
9890
**`--support-success`** | Success
9991
**`--support-info`** | Information
10092

101-
Text | Role
93+
Content | Role
10294
:--- | :---
103-
**`--text-primary`** | Primary body copy
104-
**`--text-secondary`** | Secondary text color
105-
**`--text-secondary-alt`** | Secondary text color alt
106-
**`--text-placeholder`** | Placeholder text color
107-
**`--text-on-color`** | Text on interactive color
108-
**`--text-error`** | Error message
109-
**`--text-success`** | Success message
110-
**`--text-inked`** | Inked text
95+
**`--content-primary`** | Primary body copy
96+
**`--content-secondary`** | Secondary text color
97+
**`--content-secondary-alt`** | Secondary text color alt
98+
**`--content-placeholder`** | Placeholder text color
99+
**`--content-on-color`** | Text on interactive color
100+
**`--content-error`** | Error message
101+
**`--content-success`** | Success message
102+
**`--content-inked`** | Inked text
111103

112104
#### Effects
113105

@@ -125,34 +117,28 @@ Focus | Role
125117
**`--focus-accent`** | Accent focus
126118
**`--focus-inverse`** | Focus inverse
127119

128-
Borders | Role
129-
:--- | :---
130-
**`--border-width-01`** | Default border width
131-
**`--border-width-02`** | Used for the selection and focus order
132-
133120
#### Spacings
134121

135-
Token | Size (px/rem)
136-
:--- | :---
137-
**`--spacing-00`** | 0 / 0
138-
**`--spacing-01`** | 2 / 0.125
139-
**`--spacing-02`** | 4 / 0.25
140-
**`--spacing-03`** | 6 / 0.375
141-
**`--spacing-04`** | 8 / 0.5
142-
**`--spacing-05`** | 12 / 0.75
143-
**`--spacing-06`** | 16 / 1
144-
**`--spacing-07`** | 20 / 1.25
145-
**`--spacing-08`** | 24 / 1.5
146-
**`--spacing-09`** | 32 / 2
147-
**`--spacing-10`** | 40 / 2.5
148-
**`--spacing-11`** | 48 / 3
149-
**`--spacing-12`** | 56 / 3.5
150-
**`--spacing-13`** | 64 / 4
151-
**`--spacing-14`** | 72 / 4.5
152-
**`--spacing-15`** | 80 / 5
153-
**`--spacing-16`** | 96 / 6
154-
**`--spacing-17`** | 120 / 7.5
155-
**`--spacing-18`** | 160 / 10
122+
Token | Source | Size (px/rem)
123+
:--- | :--- | :---
124+
**`--spacing-zero`** | `--spacing-00` | 0 / 0
125+
**`--spacing-xs`** | `--spacing-02` | 4 / 0.25
126+
**`--spacing-s`** | `--spacing-04` | 8 / 0.5
127+
**`--spacing-m`** | `--spacing-05` | 12 / 0.75
128+
**`--spacing-l`** | `--spacing-06` | 16 / 1
129+
**`--spacing-xl`** | `--spacing-08` | 24 / 1.5
130+
**`--spacing-xxl`** | `--spacing-09` | 32 / 2
131+
**`--spacing-xxxl`** | `--spacing-11` | 48 / 3
132+
133+
#### Sizing
134+
135+
Token | Source | Size (px/rem)
136+
:--- | :--- | :---
137+
**`--size-xs`** | `--spacing-06` | 16 / 1
138+
**`--size-s`** | `--spacing-08` | 24 / 1.5
139+
**`--size-m`** | `--spacing-09` | 32 / 2
140+
**`--controls-size-default`** | `--spacing-09` | 32 / 2
141+
**`--controls-size-small`** | `--spacing-08` | 24 / 1.5
156142

157143
#### Typography
158144

@@ -178,71 +164,3 @@ Utility (Desktop) | Utility (Mobile) | Role
178164
**`--desktop-code`** | **`--mobile-code`** | Code
179165

180166
> Note: To set line height, simply add the prefix `--lh` to the font size variables. For instance, `--desktop-body-xl` becomes `--lh-desktop-body-xl`.
181-
182-
---
183-
184-
### The new reset
185-
186-
A thoughtful SCSS, CSS reset that preserves browser defaults while giving you complete design control. New UI reset eliminates cross-browser inconsistencies without being overly opinionated, allowing you to build upon a clean foundation.
187-
188-
```scss
189-
// https://cdn.jsdelivr.net/npm/@new-ui/reset@latest/dist/index.css
190-
191-
*, *::before, *::after {
192-
box-sizing: border-box;
193-
}
194-
195-
html {
196-
-moz-text-size-adjust: none;
197-
-webkit-text-size-adjust: none;
198-
text-size-adjust: none;
199-
vertical-align: baseline;
200-
}
201-
202-
body, h1, h2, h3, h4, p,
203-
figure, blockquote, dl, dd {
204-
margin: 0;
205-
padding: 0;
206-
margin-block-end: 0;
207-
}
208-
209-
ul[role='list'],
210-
ol[role='list'] {
211-
list-style: none;
212-
}
213-
214-
body {
215-
min-height: 100vh;
216-
line-height: 1.5;
217-
}
218-
219-
h1, h2,
220-
h3, h4 {
221-
text-wrap: balance;
222-
}
223-
224-
a:not([class]) {
225-
text-decoration-skip-ink: auto;
226-
}
227-
228-
img,
229-
picture {
230-
max-width: 100%;
231-
display: block;
232-
}
233-
234-
input, textarea, button, select {
235-
font-family: inherit;
236-
font-size: inherit;
237-
margin: 0;
238-
}
239-
240-
table {
241-
border-collapse: collapse;
242-
border-spacing: 0;
243-
}
244-
245-
:target {
246-
scroll-margin-block: 5ex;
247-
}
248-
```

0 commit comments

Comments
 (0)