| 10 |
10 |
|
.stack-{peer,group,section})
|
| 11 |
11 |
|
3. Use a COMPONENT PRIMITIVE for a UI element (.card, .button, .field,
|
| 12 |
12 |
|
.modal, .badge,
|
| 13 |
|
- |
.tag, .toggle-switch)
|
|
13 |
+ |
.toggle-switch)
|
| 14 |
14 |
|
4. Extend a primitive with a modifier (.button--primary, .button--sm,
|
| 15 |
15 |
|
.field--compact,
|
| 16 |
16 |
|
.subtask-item--linked)
|
| 154 |
154 |
|
.field + .field--ghost / --compact (kind rides on the element:
|
| 155 |
155 |
|
input / select / textarea)
|
| 156 |
156 |
|
.modal + .modal-overlay
|
| 157 |
|
- |
.badge + variants ([data-color], --xs / --sm / --filled)
|
| 158 |
|
- |
.tag + variants ([data-color])
|
|
157 |
+ |
.badge + variants ([data-color], .status-*, --xs / --sm / --filled)
|
| 159 |
158 |
|
.toggle-switch
|
| 160 |
159 |
|
.avatar + .avatar--sm / --lg / --unknown
|
| 161 |
160 |
|
.toast + variants
|
| 417 |
416 |
|
.mobile-tab-bar,
|
| 418 |
417 |
|
.mobile-tab-create,
|
| 419 |
418 |
|
.badge,
|
| 420 |
|
- |
.tag,
|
| 421 |
419 |
|
.toggle-switch,
|
| 422 |
420 |
|
label,
|
| 423 |
421 |
|
button {
|
| 881 |
879 |
|
|
| 882 |
880 |
|
/* 12. Tags & Badges */
|
| 883 |
881 |
|
|
| 884 |
|
- |
.tag, .badge {
|
|
882 |
+ |
/* Shape only. Fill, edge and text colour come from the generated .badge in
|
|
883 |
+ |
layout.css, where Token::Badge is Depth::Flat: a label is not pressable, so
|
|
884 |
+ |
it carries no bevel. Do not add background, border or box-shadow here. */
|
|
885 |
+ |
.badge {
|
| 885 |
886 |
|
display: inline-flex;
|
| 886 |
887 |
|
align-items: center;
|
| 887 |
888 |
|
padding: var(--step-tight) var(--step-roomy);
|
| 888 |
|
- |
border: var(--border-width-sm) solid var(--border);
|
| 889 |
889 |
|
border-radius: var(--radius-sm);
|
| 890 |
890 |
|
font-size: var(--font-size-md);
|
| 891 |
891 |
|
font-weight: 600;
|
| 892 |
|
- |
background: var(--surface-raised);
|
| 893 |
|
- |
color: var(--content);
|
| 894 |
|
- |
box-shadow: var(--bevel-raised);
|
| 895 |
892 |
|
}
|
| 896 |
893 |
|
|
| 897 |
|
- |
/* Color variants using data attributes */
|
| 898 |
|
- |
.badge[data-color="green"], .tag[data-color="green"] {
|
|
894 |
+ |
/* Colour variants. data-color is GO's own per-tag palette, not a makeover
|
|
895 |
+ |
Tone, so these stay hand-written. A coloured badge is a pill: it declares
|
|
896 |
+ |
its own tinted fill and matching edge, because the colour carries meaning
|
|
897 |
+ |
the flat base cannot. */
|
|
898 |
+ |
.badge[data-color] {
|
|
899 |
+ |
border: var(--border-width-sm) solid var(--border);
|
|
900 |
+ |
color: var(--content);
|
|
901 |
+ |
}
|
|
902 |
+ |
.badge[data-color="green"] {
|
| 899 |
903 |
|
background-color: color-mix(in srgb, var(--category-two) 20%, var(--surface-raised));
|
| 900 |
904 |
|
border-color: var(--category-two);
|
| 901 |
905 |
|
}
|
| 902 |
|
- |
.badge[data-color="yellow"], .tag[data-color="yellow"] {
|
|
906 |
+ |
.badge[data-color="yellow"] {
|
| 903 |
907 |
|
background-color: color-mix(in srgb, var(--category-four) 20%, var(--surface-raised));
|
| 904 |
908 |
|
border-color: var(--category-four);
|
| 905 |
909 |
|
}
|
| 906 |
|
- |
.badge[data-color="red"], .tag[data-color="red"] {
|
|
910 |
+ |
.badge[data-color="red"] {
|
| 907 |
911 |
|
background-color: color-mix(in srgb, var(--category-one) 20%, var(--surface-raised));
|
| 908 |
912 |
|
border-color: var(--category-one);
|
| 909 |
913 |
|
}
|
| 910 |
|
- |
.badge[data-color="cyan"], .tag[data-color="cyan"] {
|
|
914 |
+ |
.badge[data-color="cyan"] {
|
| 911 |
915 |
|
background-color: color-mix(in srgb, var(--category-six) 20%, var(--surface-raised));
|
| 912 |
916 |
|
border-color: var(--category-six);
|
| 913 |
917 |
|
}
|
| 914 |
|
- |
.badge[data-color="purple"], .tag[data-color="purple"] {
|
|
918 |
+ |
.badge[data-color="purple"] {
|
| 915 |
919 |
|
background-color: color-mix(in srgb, var(--category-five) 20%, var(--surface-raised));
|
| 916 |
920 |
|
border-color: var(--category-five);
|
| 917 |
921 |
|
}
|
| 918 |
|
- |
.badge[data-color="muted"], .tag[data-color="muted"] {
|
|
922 |
+ |
.badge[data-color="muted"] {
|
| 919 |
923 |
|
background-color: var(--surface-sunken);
|
| 920 |
924 |
|
border-color: var(--content-muted);
|
| 921 |
925 |
|
}
|
| 922 |
|
- |
.badge[data-color="blue"], .tag[data-color="blue"] {
|
|
926 |
+ |
.badge[data-color="blue"] {
|
| 923 |
927 |
|
background-color: color-mix(in srgb, var(--category-three) 20%, var(--surface-raised));
|
| 924 |
928 |
|
border-color: var(--category-three);
|
| 925 |
929 |
|
}
|
| 927 |
931 |
|
/* Size modifiers */
|
| 928 |
932 |
|
.badge--xs { padding: var(--step-hair) var(--step-base); font-size: var(--font-size-sm); }
|
| 929 |
933 |
|
|
| 930 |
|
- |
/* Filled intent, solid accent fill, no border. Flat by intent, so no bevel
|
| 931 |
|
- |
either: the fill is the signal and an edge would fight it. Pairs with
|
| 932 |
|
- |
data-color. */
|
| 933 |
|
- |
.badge--filled { border: none; box-shadow: none; }
|
|
934 |
+ |
/* Filled intent, solid accent fill, no border: the fill is the signal and an
|
|
935 |
+ |
edge would fight it. Pairs with data-color, and has to out-specify the
|
|
936 |
+ |
[data-color] edge above to drop it. */
|
|
937 |
+ |
.badge--filled[data-color] { border: none; }
|
| 934 |
938 |
|
.badge--filled[data-color="green"] { background: var(--category-two); color: var(--content-on-action); }
|
| 935 |
939 |
|
.badge--filled[data-color="yellow"] { background: var(--category-four); color: var(--content); }
|
| 936 |
940 |
|
.badge--filled[data-color="red"] { background: var(--category-one); color: var(--content-on-action); }
|
| 955 |
959 |
|
line-height: 1;
|
| 956 |
960 |
|
}
|
| 957 |
961 |
|
|
| 958 |
|
- |
/* Project status tag colors */
|
| 959 |
|
- |
.tag.status-active {
|
|
962 |
+ |
/* Project status colours. Same pill treatment as [data-color]: a status badge
|
|
963 |
+ |
declares its own fill and edge, so it has to declare the border shorthand
|
|
964 |
+ |
too, since the base .badge has none. Applied by template interpolation
|
|
965 |
+ |
(js/projects.js, js/contact-dashboard.js build status-${...}), so a literal
|
|
966 |
+ |
grep for these class names finds nothing. */
|
|
967 |
+ |
.badge.status-active,
|
|
968 |
+ |
.badge.status-onhold, .badge.status-on_hold,
|
|
969 |
+ |
.badge.status-archived,
|
|
970 |
+ |
.badge.status-inactive,
|
|
971 |
+ |
.badge.status-completed,
|
|
972 |
+ |
.badge.badge-shared {
|
|
973 |
+ |
border: var(--border-width-sm) solid var(--border);
|
|
974 |
+ |
color: var(--content);
|
|
975 |
+ |
}
|
|
976 |
+ |
.badge.status-active {
|
| 960 |
977 |
|
background-color: color-mix(in srgb, var(--success) 20%, var(--surface-raised));
|
| 961 |
978 |
|
border-color: var(--success);
|
| 962 |
979 |
|
}
|
| 963 |
|
- |
.tag.status-onhold, .tag.status-on_hold {
|
|
980 |
+ |
.badge.status-onhold, .badge.status-on_hold {
|
| 964 |
981 |
|
background-color: color-mix(in srgb, var(--warning) 20%, var(--surface-raised));
|
| 965 |
982 |
|
border-color: var(--warning);
|
| 966 |
983 |
|
}
|
| 967 |
|
- |
.tag.status-archived {
|
|
984 |
+ |
.badge.status-archived {
|
| 968 |
985 |
|
background-color: var(--surface-sunken);
|
| 969 |
986 |
|
border-color: var(--content-muted);
|
| 970 |
987 |
|
}
|
| 971 |
|
- |
.tag.status-inactive {
|
|
988 |
+ |
.badge.status-inactive {
|
| 972 |
989 |
|
background-color: color-mix(in srgb, var(--danger) 20%, var(--surface-raised));
|
| 973 |
990 |
|
border-color: var(--danger);
|
| 974 |
991 |
|
}
|
| 975 |
|
- |
.tag.status-completed {
|
|
992 |
+ |
.badge.status-completed {
|
| 976 |
993 |
|
background-color: color-mix(in srgb, var(--category-six) 20%, var(--surface-raised));
|
| 977 |
994 |
|
border-color: var(--category-six);
|
| 978 |
995 |
|
}
|
| 979 |
996 |
|
/* Groups: a project shared into a group. */
|
| 980 |
|
- |
.tag.tag-shared {
|
|
997 |
+ |
.badge.badge-shared {
|
| 981 |
998 |
|
background-color: color-mix(in srgb, var(--info) 20%, var(--surface-raised));
|
| 982 |
999 |
|
border-color: var(--info);
|
| 983 |
1000 |
|
}
|