active_admin_theme 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -4
- data/app/assets/stylesheets/wigu/active_admin_theme.scss +79 -14
- data/lib/active_admin_theme/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1993fdd8d2c135f02b1dfe4cd689c4422c3ff1b8b3b17d5b1365c8d5001a188
|
|
4
|
+
data.tar.gz: 4e5fc48944ad78ad1684b7631537c59efc2c1b8973d10b867c7c6ca330c3e935
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9cdc504b3d55ec896fbfb0db1667b07d411be5b90b4ec6531731728d0152f4bda13ae645b3afd3f95c8429c820c9bc49bc3dc12cfafe40913e89cebe6b1c0e4d
|
|
7
|
+
data.tar.gz: 4f9c30bb187b18ed8f7d9d180b7d50ed03e3150b3ecdcdd3470d6318609118e5189781a952975ed261f68b18ed587dcb985380c78e8162b6af83cfe65bbd6b66
|
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Or add manually to `package.json`:
|
|
|
35
35
|
|
|
36
36
|
```
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@activeadmin-plugins/active_admin_theme": "^3.
|
|
38
|
+
"@activeadmin-plugins/active_admin_theme": "^3.1.0"
|
|
39
39
|
}
|
|
40
40
|
```
|
|
41
41
|
and execute:
|
|
@@ -176,8 +176,19 @@ applies it in the others.
|
|
|
176
176
|
|
|
177
177
|
### Upgrading
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
#### 3.1.0
|
|
180
|
+
|
|
181
|
+
* Status tag fills are darker, so the label can be white and still clear 4.5:1 —
|
|
182
|
+
it was black on mid-tone fills before. Each fill is a variable now
|
|
183
|
+
(`$skinStatusTagOkColor` and the four beside it), and
|
|
184
|
+
`$skinStatusTagTextColor: #000000;` restores the old label with the fills
|
|
185
|
+
you choose.
|
|
186
|
+
* Index-table column headings take `$skinTextColor` rather than a muted grey,
|
|
187
|
+
so a heading reads as strongly as the column under it.
|
|
188
|
+
|
|
189
|
+
#### 3.0.0
|
|
190
|
+
|
|
191
|
+
Three things changed shape and are worth knowing if you already set variables:
|
|
181
192
|
|
|
182
193
|
* Dropdown panels — the title-bar menu, the batch-actions menu and the
|
|
183
194
|
table-tools menus — now follow the surface palette (`$skinSurfaceColor` and
|
|
@@ -262,7 +273,13 @@ set variables:
|
|
|
262
273
|
| `$skinTabInactiveColor` / `$skinTabInactiveColorDark` | `#f7f9fb` / `#161a1e` | inactive tab fill |
|
|
263
274
|
| `$skinActiveTabTextColor` / `$skinActiveTabTextColorDark` | `$skinMainSecondColor` / `#7cc0ec` | selected tab label |
|
|
264
275
|
| `$skinInactiveTabTextColor` / `$skinInactiveTabTextColorDark` | `#5e6469` / `#b0b8c2` | inactive tab label |
|
|
265
|
-
| `$skinTableHeaderTextColor` / `$skinTableHeaderTextColorDark` |
|
|
276
|
+
| `$skinTableHeaderTextColor` / `$skinTableHeaderTextColorDark` | `$skinTextColor` / `#dde2e8` | index-table column header text; the body text colour, so headings read as strongly as the rows |
|
|
277
|
+
| `$skinStatusTagTextColor` | `#ffffff` | label inside a filled status tag; `empty` / `unknown` / `none` have no fill and keep `$skinTextMutedColor` |
|
|
278
|
+
| `$skinStatusTagNeutralColor` | `#707681` | unclassified tags: `No`, protocol tags |
|
|
279
|
+
| `$skinStatusTagOkColor` | `#5e7e63` | `ok` `published` `complete` `completed` `green` `yes` |
|
|
280
|
+
| `$skinStatusTagNoticeColor` | `#3874d2` | `notice` `blue` |
|
|
281
|
+
| `$skinStatusTagWarnColor` | `#9e6c15` | `warn` `warning` `orange` |
|
|
282
|
+
| `$skinStatusTagErrorColor` | `#ce483b` | `error` `errored` `red` |
|
|
266
283
|
| `$skinTabPaddingY` | `8px` | tab height |
|
|
267
284
|
| `$skinTabPaddingX` | `15px` | tab label horizontal padding (text → border) |
|
|
268
285
|
|
|
@@ -129,9 +129,21 @@ $skinActiveTabTextColorDark: #7cc0ec!default;
|
|
|
129
129
|
$skinInactiveTabTextColor: #5e6469!default;
|
|
130
130
|
$skinInactiveTabTextColorDark: #b0b8c2!default;
|
|
131
131
|
// Index-table column header text, one colour for sortable and plain headers.
|
|
132
|
-
$skinTableHeaderTextColor:
|
|
132
|
+
$skinTableHeaderTextColor: $skinTextColor!default;
|
|
133
133
|
$skinTableHeaderTextColorDark: #dde2e8!default;
|
|
134
134
|
|
|
135
|
+
// Status tags. The label is the same on every filled tag in both modes. The
|
|
136
|
+
// fills below are dark enough to carry a white one: every one of the five is
|
|
137
|
+
// at least 4.53 against it. The mid-tone fills this palette replaces ran from
|
|
138
|
+
// 2.35 to 3.78, under the 4.5 WCAG AA asks of text this small, which is why
|
|
139
|
+
// they moved rather than the label.
|
|
140
|
+
$skinStatusTagTextColor: #ffffff!default;
|
|
141
|
+
$skinStatusTagNeutralColor: #707681!default; // "No", protocol tags, anything unclassified
|
|
142
|
+
$skinStatusTagOkColor: #5e7e63!default; // ok / published / complete / green / yes
|
|
143
|
+
$skinStatusTagNoticeColor: #3874d2!default; // notice / blue
|
|
144
|
+
$skinStatusTagWarnColor: #9e6c15!default; // warn / warning / orange
|
|
145
|
+
$skinStatusTagErrorColor: #ce483b!default; // error / errored / red
|
|
146
|
+
|
|
135
147
|
//DARK-MODE PALETTE---------------------------------------------------------------------------------------------------//
|
|
136
148
|
// Semantic CSS custom properties for runtime light/dark switching. Light values
|
|
137
149
|
// (= the existing look) live on :root; the dark values are applied either by the
|
|
@@ -301,7 +313,13 @@ $theme-icon-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/s
|
|
|
301
313
|
skinInactiveTabTextColor: $skinInactiveTabTextColor,
|
|
302
314
|
skinInactiveTabTextColorDark: $skinInactiveTabTextColorDark,
|
|
303
315
|
skinTableHeaderTextColor: $skinTableHeaderTextColor,
|
|
304
|
-
skinTableHeaderTextColorDark: $skinTableHeaderTextColorDark
|
|
316
|
+
skinTableHeaderTextColorDark: $skinTableHeaderTextColorDark,
|
|
317
|
+
skinStatusTagTextColor: $skinStatusTagTextColor,
|
|
318
|
+
skinStatusTagNeutralColor: $skinStatusTagNeutralColor,
|
|
319
|
+
skinStatusTagOkColor: $skinStatusTagOkColor,
|
|
320
|
+
skinStatusTagNoticeColor: $skinStatusTagNoticeColor,
|
|
321
|
+
skinStatusTagWarnColor: $skinStatusTagWarnColor,
|
|
322
|
+
skinStatusTagErrorColor: $skinStatusTagErrorColor
|
|
305
323
|
) {
|
|
306
324
|
@if type-of($value) != color {
|
|
307
325
|
@error "$#{$name} must be a color (use `transparent`, not `none`), got `#{$value}`.";
|
|
@@ -441,8 +459,10 @@ body.active_admin {
|
|
|
441
459
|
// $skinMenuTextColor like every other item in the bar.
|
|
442
460
|
// On the li, not only the anchor: font-size 0 collapses the anchor to the
|
|
443
461
|
// icon's own 16px, which then sits at the top of the item instead of on
|
|
444
|
-
// the line the rest of the bar shares.
|
|
445
|
-
|
|
462
|
+
// the line the rest of the bar shares. inline-flex, not flex: ActiveAdmin
|
|
463
|
+
// lays the utility nav out as `li { display: inline }`, and a block-level
|
|
464
|
+
// item breaks the row, dropping the items after it onto new lines.
|
|
465
|
+
> li#theme_toggle { display: inline-flex; align-items: center; vertical-align: middle; }
|
|
446
466
|
> li#theme_toggle > a {
|
|
447
467
|
display: flex;
|
|
448
468
|
align-items: center;
|
|
@@ -874,6 +894,53 @@ body.active_admin {
|
|
|
874
894
|
font-weight: bold!important;
|
|
875
895
|
}
|
|
876
896
|
}
|
|
897
|
+
// ActiveAdmin puts the sort arrow inside the heading link, on the left, as a
|
|
898
|
+
// background image cleared with `padding-left: 13px`. That indents the label
|
|
899
|
+
// of every sortable column by 13px while the data below starts at the cell's
|
|
900
|
+
// own padding, so a heading never lines up with its column. The link is also
|
|
901
|
+
// `display: block`, so moving the image to the right edge would park the
|
|
902
|
+
// arrow at the far side of the column instead of beside the text.
|
|
903
|
+
//
|
|
904
|
+
// Drawn as a pseudo-element instead: it follows the label immediately, the
|
|
905
|
+
// link keeps its full width so the whole cell stays clickable, and the
|
|
906
|
+
// marker takes currentColor — the stock sprite is a fixed grey PNG that
|
|
907
|
+
// cannot follow the text into dark mode.
|
|
908
|
+
// `a[href*="order="]`, not every anchor in the header: an application can
|
|
909
|
+
// put its own link in there — yeti-web adds a persistent-sort toggle — and
|
|
910
|
+
// it would otherwise get a sort marker of its own. ActiveAdmin's heading
|
|
911
|
+
// link always carries the order parameter.
|
|
912
|
+
th.sortable > a[href*="order="] {
|
|
913
|
+
padding-left: 0;
|
|
914
|
+
background-image: none;
|
|
915
|
+
|
|
916
|
+
&:after {
|
|
917
|
+
content: "";
|
|
918
|
+
display: inline-block;
|
|
919
|
+
margin-left: 6px;
|
|
920
|
+
vertical-align: middle;
|
|
921
|
+
// The unused side has no width rather than a transparent one, so the
|
|
922
|
+
// box is exactly as tall as the triangle in it. Keeping all four sides
|
|
923
|
+
// and nudging with a margin instead puts the two states at different
|
|
924
|
+
// heights, because `vertical-align: middle` centres the box and the
|
|
925
|
+
// visible half then sits off-centre within it.
|
|
926
|
+
border: 4px solid transparent;
|
|
927
|
+
border-bottom-width: 0;
|
|
928
|
+
border-top-color: currentColor;
|
|
929
|
+
// 0.6, not lower: the marker is the only thing separating a sortable
|
|
930
|
+
// heading from a plain one, so WCAG 1.4.11 asks 3:1 of it. Against the
|
|
931
|
+
// header fill it gives 3.40 light and 4.22 dark; at 0.4 it was 2.13
|
|
932
|
+
// and 2.73.
|
|
933
|
+
opacity: 0.6;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
th.sorted-asc > a[href*="order="]:after {
|
|
937
|
+
border-top-width: 0;
|
|
938
|
+
border-bottom-width: 4px;
|
|
939
|
+
border-top-color: transparent;
|
|
940
|
+
border-bottom-color: currentColor;
|
|
941
|
+
opacity: 1;
|
|
942
|
+
}
|
|
943
|
+
th.sorted-desc > a[href*="order="]:after { opacity: 1; }
|
|
877
944
|
// Right edge = a single 1px line on the last-column cells (header th, body
|
|
878
945
|
// td, footer cells) coloured like the table border, since the table itself
|
|
879
946
|
// no longer draws a right border.
|
|
@@ -1413,11 +1480,9 @@ input[type='radio'] {
|
|
|
1413
1480
|
@mixin status-tag-colors($c) {
|
|
1414
1481
|
background: $c;
|
|
1415
1482
|
border-color: mix($c, #000000, 84%); // = darken($c) — outline in the fill colour
|
|
1416
|
-
//
|
|
1417
|
-
//
|
|
1418
|
-
|
|
1419
|
-
// the first thing tried and misses by 0.02 on the error red.
|
|
1420
|
-
color: #000000;
|
|
1483
|
+
// The fills are dark enough to carry this label: every one of the five is at
|
|
1484
|
+
// least 4.53 against white. Lighten one and the label needs to go with it.
|
|
1485
|
+
color: $skinStatusTagTextColor;
|
|
1421
1486
|
}
|
|
1422
1487
|
|
|
1423
1488
|
//CONTENT (both modes)-----------------------------------------------------------//
|
|
@@ -1449,11 +1514,11 @@ input[type='radio'] {
|
|
|
1449
1514
|
border-radius: 2px;
|
|
1450
1515
|
border: 1px solid;
|
|
1451
1516
|
|
|
1452
|
-
@include status-tag-colors(
|
|
1453
|
-
&.ok, &.published, &.complete, &.completed, &.green, &.yes { @include status-tag-colors(
|
|
1454
|
-
&.notice, &.blue { @include status-tag-colors(
|
|
1455
|
-
&.warn, &.warning, &.orange { @include status-tag-colors(
|
|
1456
|
-
&.error, &.errored, &.red { @include status-tag-colors(
|
|
1517
|
+
@include status-tag-colors($skinStatusTagNeutralColor);
|
|
1518
|
+
&.ok, &.published, &.complete, &.completed, &.green, &.yes { @include status-tag-colors($skinStatusTagOkColor); }
|
|
1519
|
+
&.notice, &.blue { @include status-tag-colors($skinStatusTagNoticeColor); }
|
|
1520
|
+
&.warn, &.warning, &.orange { @include status-tag-colors($skinStatusTagWarnColor); }
|
|
1521
|
+
&.error, &.errored, &.red { @include status-tag-colors($skinStatusTagErrorColor); }
|
|
1457
1522
|
&.empty, &.unknown, &.none {
|
|
1458
1523
|
background: none;
|
|
1459
1524
|
border: 0; // placeholder/empty tags stay unobtrusive (no outline)
|