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: apps/www/app/content/fundamentals/en/figma/variables-in-figma.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ icon: PaletteIcon
8
8
published: true
9
9
order: 30
10
10
---
11
+
12
+
When you create new components in Figma, connect sizes, spacing and colours to the correct variables. This makes the components work as expected across different sizes, and ensures that colours follow the selected theme and work in both light and dark mode.
13
+
11
14
## Size Variables
12
15
13
16
Size variables are used to set both spacing and sizes.
@@ -54,8 +57,6 @@ To set up your own color variables, see the guide "[Design System with Custom Th
54
57
### What is main and support?
55
58
Main and Support are separate modes in Figma that simulate the functionality of data-color from code. They only exist in Figma and allow you to control which colors components should use, based on context.
56
59
57
-
In Figma without an enterprise license, you can use 4 colors per mode, meaning 8 colors total distributed between main and support.
58
-
59
60
Read more about how these are used in [modes in Figma](/en/fundamentals/figma/modes-in-figma)
60
61
61
62
This gives you two important advantages:
@@ -67,4 +68,4 @@ Instead of creating separate components for blue, red, green, etc., the same com
67
68
### Colors in Figma Dev Mode
68
69
In Figma Dev Mode, colors are displayed in two ways:
69
70
- Main / Support: Used for flexible colors, equivalent to [data-color in code](/en/fundamentals/code/colors). You set a mode like main/border-default, and the component inherits the correct color. This makes it easier to reuse components without creating new variants. The modes are cascading - you can set them on page, frame or element.
70
-
- Explicit color: Used when a color should always be the same, regardless of mode. The display in Dev Mode will then show a specific variable, just as in code.
71
+
- Explicit color: Used when a color should always be the same, regardless of mode. The display in Dev Mode will then show a specific variable, just as in code.
Copy file name to clipboardExpand all lines: apps/www/app/content/fundamentals/no/figma/variables-in-figma.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ published: true
9
9
order: 30
10
10
search_terms: figmavariabler, variables
11
11
---
12
+
13
+
Når du lager nye komponenter i Figma, bør du koble størrelser, avstander og farger til riktige variabler. Da vil komponentene fungere som forventet i ulike størrelser, og fargene vil følge valgt theme og fungere i både light og dark mode.
14
+
12
15
## Size-variabler
13
16
14
17
Size-variabler brukes til å sette både avstander og størrelser.
@@ -55,8 +58,6 @@ For å sette opp egne fargevariabler se guiden "[Designsystemet med eget tema](/
55
58
### Hva er main og support?
56
59
Main og Support er egne modes i Figma som simulerer funksjonaliteten til data-color fra kode. De finnes kun i Figma og lar deg styre hvilke farger komponenter skal bruke, basert på kontekst.
57
60
58
-
I Figma uten enterprise-lisens kan du bruke 4 farger per mode, altså 8 farger totalt fordelt mellom main og support.
59
-
60
61
Les mer om hvordan disse brukes i [modes i Figma](/no/fundamentals/figma/modes-in-figma)
61
62
62
63
Dette gir deg to viktige fordeler:
@@ -68,4 +69,4 @@ I stedet for å lage separate komponenter for blå, rød, grønn osv., kan én o
68
69
### Farger i Figma Dev Mode
69
70
I Figma Dev Mode vises farger på to måter:
70
71
- Main / Support: Brukes for fleksible farger, tilsvarende [data-color i kode](/no/fundamentals/code/colors). Du setter en mode som main/border-default, og komponenten arver riktig farge. Dette gjør det enklere å gjenbruke komponenter uten å lage nye varianter. Modusene er cascading - du kan sette dem på page, frame eller element.
71
-
- Eksplisitt farge: Brukes når en farge alltid skal være den samme, uansett mode. Visningen i Dev Mode vil da vise en spesifikk variabel, akkurat som i kode.
72
+
- Eksplisitt farge: Brukes når en farge alltid skal være den samme, uansett mode. Visningen i Dev Mode vil da vise en spesifikk variabel, akkurat som i kode.
0 commit comments