@@ -86,7 +86,7 @@ const propertySizeTemplate = (property: any) => html` <uui-table-row>
86
86
</ uui-table-row > `;
87
87
88
88
export const InterfaceColors = ( ) => {
89
- const surface = [
89
+ const base = [
90
90
'surface' ,
91
91
'background' ,
92
92
'text' ,
@@ -99,83 +99,94 @@ export const InterfaceColors = () => {
99
99
const universal = [ 'header' , 'focus' , 'hover' ] ;
100
100
101
101
return html `
102
- < h2 > Interface Colors</ h2 >
103
- < p >
104
- These are used to overwrite selected interface properties to get a
105
- specific look.
106
- </ p >
107
-
108
- < h3 > Naming convention</ h3 >
109
- < p > Here's a description and examples of how to use the interface colors.</ p >
110
- < h4 > Color variants</ h4 >
111
- < p > Most colors has up to 3 variants.</ p >
112
- < ul >
113
- < li >
114
- < b > Contrast</ b > - This color will stand out and be readable with the
115
- main color as it's background. Mostly used for text and icons.
116
- </ li >
117
- < li >
118
- < b > Standalone</ b > - This color will have a higher contrast to the
119
- surface color than it's main variant. Example: if the surface color is
120
- light, the standalone variant will be a darker variant of the main
121
- color. Often used when thin or smaller items has to stand out on the
122
- surface backgrounds. Items such as: text, icons and border.
123
- </ li >
124
- < li >
125
- < b > Emphasis</ b > - Used when you want to emphasize an element, make it
126
- stand out. Mostly used for hover and focus states.
127
- </ li >
128
- </ ul >
129
- < h4 > Text and interactables</ h4 >
130
- < ul >
131
- < li >
132
- < b > Text</ b > - Used for most text, or icons appearing together with text
133
- </ li >
134
- < li >
135
- < b > Interactable</ b > - Used when the text or icon is interactable, such
136
- as a link
137
- </ li >
138
- </ ul >
139
- < h4 > States</ h4 >
140
- < ul >
141
- < li >
142
- < b > Selected</ b > - Used to highlight the text or background color of
143
- items that are currently selected.
144
- </ li >
145
- < li >
146
- < b > Current</ b > - Only used to show navigation. Example: Background or
147
- text color of the current tab or breadcrumb.
148
- </ li >
149
- < li > < b > Disabled</ b > - For elements that are disabled.</ li >
150
- </ ul >
151
- < h4 > Borders and dividers</ h4 >
152
- < ul >
153
- < li > < b > Border</ b > - Used when an element needs a border around it</ li >
154
- < li >
155
- < b > Divider</ b > - For elements that needs to be visually separated.
156
- Example: a list of items
157
- </ li >
158
- </ ul >
159
- < h4 > Misc</ h4 >
160
- < ul >
161
- < li > < b > Surface</ b > - The main background color for elements</ li >
162
- < li > < b > Background</ b > - The main background color of the app</ li >
163
- < li > < b > Header</ b > - Background color of the header of the app</ li >
164
- < li >
165
- < b > Focus</ b > - Color for the focus outline on inputs, buttons, links and
166
- so on
167
- </ li >
168
- </ ul >
169
-
170
- < h3 > Surface</ h3 >
102
+ < article style ="max-width:580px; ">
103
+ < div
104
+ style ="display:block; border-bottom: 1px solid var(--uui-palette-cocoa-black); padding-top: var(--uui-size-layout-5); margin-bottom:var(--uui-size-layout-3); padding-bottom:var(--uui-size-layout-1); ">
105
+ < h1 > Interface Colors</ h1 >
106
+ < p class ="uui-lead ">
107
+ Interface styling should use the following properties to ensure
108
+ contrasts and appearance follows the current theme.
109
+ </ p >
110
+ < p >
111
+ Here's a description and examples of how to use the interface colors.
112
+ </ p >
113
+ </ div >
114
+
115
+ < h4 > Text and interactables</ h4 >
116
+ < ul >
117
+ < li >
118
+ < b > Text</ b > - Used for most text, or icons appearing together with
119
+ text
120
+ </ li >
121
+ < li >
122
+ < b > Interactable</ b > - Used when the text or icon is interactable, such
123
+ as a link
124
+ </ li >
125
+ </ ul >
126
+
127
+ < h4 > States</ h4 >
128
+ < ul >
129
+ < li >
130
+ < b > Selected</ b > - Used to highlight the text or background color of
131
+ items that are currently selected.
132
+ </ li >
133
+ < li >
134
+ < b > Current</ b > - Only used to show navigation. Example: Background or
135
+ text color of the current tab or breadcrumb.
136
+ </ li >
137
+ < li > < b > Disabled</ b > - For elements that are disabled.</ li >
138
+ </ ul >
139
+
140
+ < h4 > Borders and dividers</ h4 >
141
+ < ul >
142
+ < li > < b > Border</ b > - Used when an element needs a border around it</ li >
143
+ < li >
144
+ < b > Divider</ b > - For elements that needs to be visually separated.
145
+ Example: a list of items
146
+ </ li >
147
+ </ ul >
148
+
149
+ < h4 > Misc</ h4 >
150
+ < ul >
151
+ < li > < b > Surface</ b > - The main background color for elements</ li >
152
+ < li > < b > Background</ b > - The main background color of the app</ li >
153
+ < li > < b > Header</ b > - Background color of the header of the app</ li >
154
+ < li >
155
+ < b > Focus</ b > - Color for the focus outline on inputs, buttons, links
156
+ and so on
157
+ </ li >
158
+ </ ul >
159
+
160
+ < h4 > Color variants</ h4 >
161
+ < p > Each color can come in additional variants:</ p >
162
+ < ul >
163
+ < li >
164
+ < b > Contrast</ b > - This color will stand out and be readable with the
165
+ main color as it's background. Mostly used for text and icons.
166
+ </ li >
167
+ < li >
168
+ < b > Standalone</ b > - This color will have a higher contrast to the
169
+ surface color than it's main variant. Example: if the surface color is
170
+ light, the standalone variant will be a darker variant of the main
171
+ color. Often used when thin or smaller items has to stand out on the
172
+ surface backgrounds. Items such as: text, icons and border.
173
+ </ li >
174
+ < li >
175
+ < b > Emphasis</ b > - Used when you want to emphasize an element, make it
176
+ stand out. Mostly used for hover and focus states.
177
+ </ li >
178
+ </ ul >
179
+ </ article >
180
+
181
+ < h3 > Base</ h3 >
171
182
< uui-table @click =${ copyToClipboard } >
172
183
< uui-table-head >
173
184
< uui-table-head-cell > Custom property name</ uui-table-head-cell >
174
185
< uui-table-head-cell > Value</ uui-table-head-cell >
175
186
< uui-table-head-cell > Example</ uui-table-head-cell >
176
187
</ uui-table-head >
177
188
${ properties
178
- . filter ( property => surface . some ( x => property . key . includes ( x ) ) )
189
+ . filter ( property => base . some ( x => property . key . includes ( x ) ) )
179
190
. map ( property => propertyColorTemplate ( property ) ) }
180
191
</ uui-table >
181
192
0 commit comments