@expressivecss/expressive 0.1.0 → 0.3.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.
Files changed (40) hide show
  1. package/README.md +8 -8
  2. package/dist/css/expressive.css +1088 -356
  3. package/dist/css/expressive.css.map +1 -1
  4. package/dist/css/expressive.min.css +1 -1
  5. package/dist/css/expressive.min.css.map +1 -1
  6. package/dist/js/expressive.cjs +778 -746
  7. package/dist/js/expressive.cjs.map +4 -4
  8. package/dist/js/expressive.js +778 -746
  9. package/dist/js/expressive.js.map +4 -4
  10. package/dist/js/expressive.min.js +10 -10
  11. package/dist/js/expressive.min.js.map +4 -4
  12. package/dist/js/expressive.mjs +778 -746
  13. package/dist/js/expressive.mjs.map +4 -4
  14. package/dist/types/behaviors/dialogs.d.ts +25 -0
  15. package/dist/types/components/buttons.d.ts +17 -41
  16. package/dist/types/components/carousel.d.ts +40 -46
  17. package/dist/types/components/chips.d.ts +2 -2
  18. package/dist/types/components/collapsible.d.ts +35 -13
  19. package/dist/types/components/parallax.d.ts +7 -31
  20. package/dist/types/components/tapTarget.d.ts +23 -24
  21. package/dist/types/index.d.ts +2 -1
  22. package/package.json +1 -1
  23. package/src/sass/README.md +4 -3
  24. package/src/sass/components/_badges.scss +5 -4
  25. package/src/sass/components/_breadcrumb.scss +93 -16
  26. package/src/sass/components/_buttons.scss +195 -96
  27. package/src/sass/components/_carousel.scss +130 -63
  28. package/src/sass/components/_chips.scss +1 -1
  29. package/src/sass/components/_collapsible.scss +160 -60
  30. package/src/sass/components/_collection.scss +161 -77
  31. package/src/sass/components/_icons-material-design.scss +77 -4
  32. package/src/sass/components/_lightbox.scss +4 -0
  33. package/src/sass/components/_modal.scss +67 -3
  34. package/src/sass/components/_navbar.scss +15 -0
  35. package/src/sass/components/_pagination.scss +131 -25
  36. package/src/sass/components/_parallax.scss +116 -20
  37. package/src/sass/components/_sidenav.scss +10 -5
  38. package/src/sass/components/_slider.scss +8 -0
  39. package/src/sass/components/_tapTarget.scss +134 -47
  40. package/src/sass/utilities/_helpers.scss +10 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Light-dismiss for native `<dialog>` elements.
3
+ *
4
+ * `showModal()` does not close on a backdrop tap. A naive `click` listener
5
+ * on the dialog (where `::backdrop` events retarget) also fires when the
6
+ * user starts a gesture on the dialog and releases on the scrim — selecting
7
+ * text, missing a button, dragging a thumb. Both ends of the pointer
8
+ * gesture must land outside the dialog's border box.
9
+ *
10
+ * Default is on. Opt out with `closedby="none"` or `closedby="closerequest"`.
11
+ * If the browser already honours `closedby="any"`, we leave that alone.
12
+ */
13
+ export declare class Dialogs {
14
+ private static _down;
15
+ static Init(): void;
16
+ static _onPointerDown(event: PointerEvent): void;
17
+ static _onPointerUp(event: PointerEvent): void;
18
+ static _onPointerCancel(): void;
19
+ /** Backdrop hits retarget to the dialog itself, never a child. */
20
+ private static _backdropDialog;
21
+ private static _outside;
22
+ private static _isPrimaryPress;
23
+ private static _lightDismissible;
24
+ private static _closedBy;
25
+ }
@@ -6,54 +6,33 @@ export interface FloatingActionButtonOptions extends BaseOptions {
6
6
  */
7
7
  direction: 'top' | 'right' | 'bottom' | 'left';
8
8
  /**
9
- * true: FAB menu appears on hover, false: FAB menu appears on click.
9
+ * true: FAB menu appears on hover (CSS, when the pointer can hover).
10
+ * false: FAB menu toggles on click. `.click-to-toggle` is the markup switch.
10
11
  * @default true
11
12
  */
12
13
  hoverEnabled: boolean;
13
14
  /**
14
- * Enable transit the FAB into a toolbar on click.
15
+ * Expand the FAB into a toolbar on click. Prefer a hover or click menu.
16
+ * `.toolbar` on the element is the markup switch.
15
17
  * @default false
16
18
  */
17
19
  toolbarEnabled: boolean;
18
20
  }
21
+ /**
22
+ * Speed dial around a FAB. Open/close is the `.active` class; motion is
23
+ * CSS. Hover is CSS (`:hover` when the pointer can hover). This class
24
+ * toggles the class, wires keyboard / click-outside, and stamps direction.
25
+ */
19
26
  export declare class FloatingActionButton extends Component<FloatingActionButtonOptions> implements Openable {
20
- /**
21
- * Describes open/close state of FAB.
22
- */
23
27
  isOpen: boolean;
24
28
  private _anchor;
25
29
  private _menu;
26
- private _floatingBtns;
27
- private _floatingBtnsReverse;
28
- /** Toolbar-mode backdrop, kept so closing can take it back out. */
29
- private _backdrop;
30
- offsetY: number;
31
- offsetX: number;
32
- btnBottom: number;
33
- btnLeft: number;
34
- btnWidth: number;
35
30
  constructor(el: HTMLElement, options: Partial<FloatingActionButtonOptions>);
36
31
  static get defaults(): FloatingActionButtonOptions;
37
- /**
38
- * Initializes instance of FloatingActionButton.
39
- * @param el HTML element.
40
- * @param options Component options.
41
- */
42
32
  static init(el: HTMLElement, options?: Partial<FloatingActionButtonOptions>): FloatingActionButton;
43
- /**
44
- * Initializes instances of FloatingActionButton.
45
- * @param els HTML elements.
46
- * @param options Component options.
47
- */
48
33
  static init(els: InitElements<MElement>, options?: Partial<FloatingActionButtonOptions>): FloatingActionButton[];
49
34
  static getInstance(el: HTMLElement): FloatingActionButton;
50
35
  destroy(): void;
51
- _setupEventHandlers(): void;
52
- _removeEventHandlers(): void;
53
- _handleFABClick: () => void;
54
- _handleFABKeyPress: (e: any) => void;
55
- _handleFABToggle: () => void;
56
- _handleDocumentClick: (e: MouseEvent) => void;
57
36
  /**
58
37
  * Open FAB.
59
38
  */
@@ -62,15 +41,12 @@ export declare class FloatingActionButton extends Component<FloatingActionButton
62
41
  * Close FAB.
63
42
  */
64
43
  close: () => void;
65
- _animateInFAB(): void;
66
- _animateOutFAB(): void;
67
- _animateInToolbar(): void;
68
- /**
69
- * Reverse {@link _animateInToolbar}.
70
- *
71
- * Closing used to only unbind the listeners, leaving the FAB stretched
72
- * across the viewport with its backdrop still in the DOM - and a fresh
73
- * backdrop appended on every subsequent open.
74
- */
75
- _animateOutToolbar(): void;
44
+ private _directionFromClass;
45
+ private _setupEventHandlers;
46
+ private _removeEventHandlers;
47
+ private _handleFABClick;
48
+ private _handleAnchorKeydown;
49
+ private _handleDocumentKeydown;
50
+ private _handleDocumentClick;
51
+ private _toggle;
76
52
  }
@@ -1,47 +1,49 @@
1
1
  import { Component, BaseOptions, InitElements, MElement } from '../core/component';
2
2
  export interface CarouselOptions extends BaseOptions {
3
3
  /**
4
- * Transition duration in milliseconds.
4
+ * Transition duration in milliseconds (coverflow). Snap mode uses CSS.
5
5
  * @default 200
6
6
  */
7
7
  duration: number;
8
8
  /**
9
- * Perspective zoom. If 0, all items are the same size.
9
+ * Perspective zoom. If 0, all items are the same size. Coverflow only.
10
10
  * @default -100
11
11
  */
12
12
  dist: number;
13
13
  /**
14
- * Set the spacing of the center item.
14
+ * Extra spacing on the center item. Coverflow only.
15
15
  * @default 0
16
16
  */
17
17
  shift: number;
18
18
  /**
19
- * Set the padding between non center items.
19
+ * Padding between items that are not in the center. Coverflow only.
20
20
  * @default 0
21
21
  */
22
22
  padding: number;
23
23
  /**
24
- * Set the number of visible items.
24
+ * How many items stay visible. Coverflow only.
25
25
  * @default 5
26
26
  */
27
27
  numVisible: number;
28
28
  /**
29
- * Make the carousel a full width slider like the second example.
29
+ * Linear snap track instead of 3D coverflow.
30
+ * Also implied by `.flat` / `.carousel-slider`.
30
31
  * @default false
31
32
  */
32
33
  fullWidth: boolean;
33
34
  /**
34
- * Set to true to show indicators.
35
+ * Show paging dots. Only drawn when there is more than one item.
35
36
  * @default false
36
37
  */
37
38
  indicators: boolean;
38
39
  /**
39
- * Don't wrap around and cycle through items.
40
+ * Stop at the first and last items instead of wrapping. Coverflow only.
41
+ * Snap tracks do not wrap.
40
42
  * @default false
41
43
  */
42
44
  noWrap: boolean;
43
45
  /**
44
- * Callback for when a new slide is cycled to.
46
+ * Called when a new item becomes the center.
45
47
  * @default null
46
48
  */
47
49
  onCycleTo: (current: Element, dragged: boolean) => void;
@@ -50,9 +52,7 @@ export declare class Carousel extends Component<CarouselOptions> {
50
52
  hasMultipleSlides: boolean;
51
53
  showIndicators: boolean;
52
54
  noWrap: boolean;
53
- /** If the carousel is being clicked or tapped. */
54
55
  pressed: boolean;
55
- /** If the carousel is currently being dragged. */
56
56
  dragged: boolean;
57
57
  offset: number;
58
58
  target: number;
@@ -60,7 +60,7 @@ export declare class Carousel extends Component<CarouselOptions> {
60
60
  itemWidth: number;
61
61
  itemHeight: number;
62
62
  dim: number;
63
- _indicators: HTMLUListElement;
63
+ _indicators: HTMLUListElement | HTMLElement;
64
64
  count: number;
65
65
  verticalDragged: boolean;
66
66
  reference: number;
@@ -68,63 +68,57 @@ export declare class Carousel extends Component<CarouselOptions> {
68
68
  velocity: number;
69
69
  frame: number;
70
70
  timestamp: number;
71
- ticker: ReturnType<typeof setTimeout>;
72
71
  amplitude: number;
73
- /** The index of the center carousel item. */
74
72
  center: number;
75
73
  imageHeight: number;
76
74
  scrollingTimeout: ReturnType<typeof setTimeout>;
77
75
  oneTimeCallback: (current: Element, dragged: boolean) => void | null;
76
+ private _flat;
77
+ private _ownIndicators;
78
+ private _trackEl;
79
+ private _ignoreScroll;
80
+ private _trackRaf;
81
+ private _started;
82
+ private get _scroller();
83
+ private static _live;
84
+ private static _resizeListening;
85
+ private static _onResize;
78
86
  constructor(el: HTMLElement, options: Partial<CarouselOptions>);
79
87
  static get defaults(): CarouselOptions;
80
- /**
81
- * Initializes instance of Carousel.
82
- * @param el HTML element.
83
- * @param options Component options.
84
- */
85
88
  static init(el: HTMLElement, options?: Partial<CarouselOptions>): Carousel;
86
- /**
87
- * Initializes instances of Carousel.
88
- * @param els HTML elements.
89
- * @param options Component options.
90
- */
91
89
  static init(els: InitElements<MElement>, options?: Partial<CarouselOptions>): Carousel[];
92
90
  static getInstance(el: HTMLElement): Carousel;
93
91
  destroy(): void;
92
+ private _collectItems;
93
+ private _setupIndicators;
94
94
  _setupEventHandlers(): void;
95
95
  _removeEventHandlers(): void;
96
+ private _teardown;
96
97
  _handleThrottledResize: (...args: unknown[]) => any;
97
- _handleCarouselTap: (e: MouseEvent | TouchEvent) => void;
98
- _handleCarouselDrag: (e: MouseEvent | TouchEvent) => boolean;
99
- _handleCarouselRelease: (e: MouseEvent | TouchEvent) => boolean;
100
- _handleCarouselClick: (e: MouseEvent | TouchEvent) => boolean;
98
+ _handleCarouselTap: (e: PointerEvent) => void;
99
+ _handleCarouselDrag: (e: PointerEvent) => void;
100
+ _handleCarouselRelease: (e: PointerEvent) => void;
101
+ _handleCarouselClick: (e: MouseEvent) => void;
101
102
  _handleIndicatorClick: (e: Event) => void;
102
- _handleIndicatorKeyPress: (e: KeyboardEvent) => void;
103
- _handleIndicatorInteraction: (e: Event) => void;
103
+ _handleKeydown: (e: KeyboardEvent) => void;
104
+ _handleFlatScroll: () => void;
104
105
  _handleResize: () => void;
105
- _setCarouselHeight(imageOnly?: boolean): void;
106
- _xpos(e: MouseEvent | TouchEvent): number;
107
- _ypos(e: MouseEvent | TouchEvent): number;
106
+ _xpos(e: PointerEvent | MouseEvent | TouchEvent): number;
107
+ _ypos(e: PointerEvent | MouseEvent | TouchEvent): number;
108
108
  _wrap(x: number): any;
109
109
  _track: () => void;
110
110
  _autoScroll: () => void;
111
111
  _scroll(x?: number): void;
112
112
  _updateItemStyle(el: HTMLElement, opacity: number, zIndex: number, transform: string): void;
113
+ private _paintIndicators;
114
+ private _syncA11y;
115
+ private _syncActive;
116
+ private _wrapTrack;
117
+ private _unwrapTrack;
118
+ private _nearestIndex;
119
+ private _scrollToIndex;
113
120
  _cycleTo(n: number, callback?: CarouselOptions['onCycleTo']): void;
114
- /**
115
- * Move carousel to next slide or go forward a given amount of slides.
116
- * @param n How many times the carousel slides.
117
- */
118
121
  next(n?: number): void;
119
- /**
120
- * Move carousel to previous slide or go back a given amount of slides.
121
- * @param n How many times the carousel slides.
122
- */
123
122
  prev(n?: number): void;
124
- /**
125
- * Move carousel to nth slide.
126
- * @param n Index of slide.
127
- * @param callback "onCycleTo" optional callback.
128
- */
129
123
  set(n: number, callback?: CarouselOptions['onCycleTo']): void;
130
124
  }
@@ -46,8 +46,8 @@ export interface ChipsOptions extends BaseOptions {
46
46
  */
47
47
  limit: number;
48
48
  /**
49
- * Specifies class to be used in "close" button (useful when working with Material Symbols icon set).
50
- * @default 'material-icons'
49
+ * Specifies class to be used in "close" button.
50
+ * @default 'material-symbols'
51
51
  */
52
52
  closeIconClass: string;
53
53
  /**
@@ -1,17 +1,22 @@
1
1
  import { Component, BaseOptions, InitElements, MElement } from '../core/component';
2
2
  export interface CollapsibleOptions extends BaseOptions {
3
3
  /**
4
- * If accordion versus collapsible.
4
+ * If accordion versus collapsible. When omitted, `.expandable` on the
5
+ * element turns accordion off. `<details>` with the same `name` already
6
+ * exclusive-open in the browser; this option is the switch for the
7
+ * `<ul>/<li>` alias and assigns `name` when it is missing.
5
8
  * @default true
6
9
  */
7
10
  accordion: boolean;
8
11
  /**
9
- * Transition in duration in milliseconds.
12
+ * @deprecated Duration is CSS (`--md-comp-collapsible-duration`).
13
+ * Accepted so existing init calls keep compiling, and ignored.
10
14
  * @default 300
11
15
  */
12
16
  inDuration: number;
13
17
  /**
14
- * Transition out duration in milliseconds.
18
+ * @deprecated Duration is CSS (`--md-comp-collapsible-duration`).
19
+ * Accepted so existing init calls keep compiling, and ignored.
15
20
  * @default 300
16
21
  */
17
22
  outDuration: number;
@@ -36,8 +41,16 @@ export interface CollapsibleOptions extends BaseOptions {
36
41
  */
37
42
  onCloseEnd: (el: Element) => void;
38
43
  }
44
+ /**
45
+ * Collapsible. Open/close is HTML (`<details>` / `[open]`, or `.active` on
46
+ * the `<li>` alias). Height is CSS. This class is the public API, accordion
47
+ * for the alias, and aria on non-native headers.
48
+ */
39
49
  export declare class Collapsible extends Component<CollapsibleOptions> {
40
- private _headers;
50
+ private _items;
51
+ private _groupName;
52
+ private _endTimers;
53
+ private _wrappedBodies;
41
54
  constructor(el: HTMLElement, options: Partial<CollapsibleOptions>);
42
55
  static get defaults(): CollapsibleOptions;
43
56
  /**
@@ -54,21 +67,30 @@ export declare class Collapsible extends Component<CollapsibleOptions> {
54
67
  static init(els: InitElements<MElement>, options?: Partial<CollapsibleOptions>): Collapsible[];
55
68
  static getInstance(el: HTMLElement): Collapsible;
56
69
  destroy(): void;
57
- _setupEventHandlers(): void;
58
- _removeEventHandlers(): void;
59
- _handleCollapsibleClick: (e: MouseEvent | KeyboardEvent) => void;
60
- _handleCollapsibleKeydown: (e: KeyboardEvent) => void;
61
- private _setExpanded;
62
- _animateIn(index: number): void;
63
- _animateOut(index: number): void;
64
70
  /**
65
71
  * Open collapsible section.
66
- * @param n Nth section to open.
72
+ * @param index 0-based index of the section to open.
67
73
  */
68
74
  open: (index: number) => void;
69
75
  /**
70
76
  * Close collapsible section.
71
- * @param n Nth section to close.
77
+ * @param index 0-based index of the section to close.
72
78
  */
73
79
  close: (index: number) => void;
80
+ private _collectItems;
81
+ private _setupItems;
82
+ private _isOpen;
83
+ private _setOpen;
84
+ private _headerOf;
85
+ private _wrapDetailsBodies;
86
+ private _unwrapDetailsBodies;
87
+ private _bodyOf;
88
+ private _syncAria;
89
+ private _setupEventHandlers;
90
+ private _removeEventHandlers;
91
+ private _handleClick;
92
+ private _handleKeydown;
93
+ private _handleToggle;
94
+ private _notify;
95
+ private _durationMs;
74
96
  }
@@ -1,46 +1,22 @@
1
1
  import { Component, BaseOptions, InitElements, MElement } from '../core/component';
2
2
  export interface ParallaxOptions extends BaseOptions {
3
3
  /**
4
- * The minimum width of the screen, in pixels, where the parallax functionality starts working.
4
+ * @deprecated Motion is CSS (`animation-timeline: view()`). This value
5
+ * is accepted so existing AutoInit calls keep compiling, and is ignored.
5
6
  * @default 0
6
7
  */
7
8
  responsiveThreshold: number;
8
9
  }
10
+ /**
11
+ * Parallax. The effect is CSS (see components/_parallax.scss). This class
12
+ * exists so AutoInit / getInstance / destroy keep working; it does not
13
+ * attach scroll or resize listeners.
14
+ */
9
15
  export declare class Parallax extends Component<ParallaxOptions> {
10
- private _enabled;
11
- private _img;
12
- static _parallaxes: Parallax[];
13
- static _handleWindowResizeThrottled: (...args: unknown[]) => void;
14
- private static _scrollFrame;
15
16
  constructor(el: HTMLElement, options: Partial<ParallaxOptions>);
16
17
  static get defaults(): ParallaxOptions;
17
- /**
18
- * Initializes instance of Parallax.
19
- * @param el HTML element.
20
- * @param options Component options.
21
- */
22
18
  static init(el: HTMLElement, options?: Partial<ParallaxOptions>): Parallax;
23
- /**
24
- * Initializes instances of Parallax.
25
- * @param els HTML elements.
26
- * @param options Component options.
27
- */
28
19
  static init(els: InitElements<MElement>, options?: Partial<ParallaxOptions>): Parallax[];
29
20
  static getInstance(el: HTMLElement): Parallax;
30
21
  destroy(): void;
31
- static _handleScroll(): void;
32
- /**
33
- * Coalesce scroll events onto animation frames.
34
- *
35
- * The handler reads layout and then writes a transform, so running it more
36
- * than once per frame is wasted work - and the 5ms throttle it replaces was
37
- * short enough to let several run per frame anyway.
38
- */
39
- static _requestScrollUpdate: () => void;
40
- static _handleWindowResize(): void;
41
- _setupEventHandlers(): void;
42
- _removeEventHandlers(): void;
43
- _setupStyles(): void;
44
- _handleImageLoad: () => void;
45
- _updateParallax(): void;
46
22
  }
@@ -11,42 +11,29 @@ export interface TapTargetOptions extends BaseOptions {
11
11
  */
12
12
  onClose: (origin: HTMLElement) => void;
13
13
  }
14
+ /**
15
+ * Tap target (Feature Discovery). Placement is CSS custom properties;
16
+ * the wrapper is a popover when the platform has one. This class is
17
+ * open/close, origin lookup, and the two geometry variables.
18
+ */
14
19
  export declare class TapTarget extends Component<TapTargetOptions> implements Openable {
15
- /**
16
- * If the tap target is open.
17
- */
18
20
  isOpen: boolean;
21
+ originEl: HTMLElement | null;
19
22
  static _taptargets: TapTarget[];
20
23
  private wrapper;
21
- private originEl;
22
24
  private waveEl;
23
25
  private contentEl;
26
+ private _createdWrapper;
27
+ private _createdWave;
28
+ private _usePopover;
29
+ private _liftedStatic;
30
+ private _opening;
24
31
  constructor(el: HTMLElement, options: Partial<TapTargetOptions>);
25
32
  static get defaults(): TapTargetOptions;
26
- /**
27
- * Initializes instance of TapTarget.
28
- * @param el HTML element.
29
- * @param options Component options.
30
- */
31
33
  static init(el: HTMLElement, options?: Partial<TapTargetOptions>): TapTarget;
32
- /**
33
- * Initializes instances of TapTarget.
34
- * @param els HTML elements.
35
- * @param options Component options.
36
- */
37
34
  static init(els: InitElements<MElement>, options?: Partial<TapTargetOptions>): TapTarget[];
38
35
  static getInstance(el: HTMLElement): TapTarget;
39
36
  destroy(): void;
40
- _setupEventHandlers(): void;
41
- _removeEventHandlers(): void;
42
- _handleThrottledResize: (...args: unknown[]) => any;
43
- _handleKeyboardInteraction: (e: KeyboardEvent) => void;
44
- _handleTargetToggle: () => void;
45
- _handleResize: () => void;
46
- _handleDocumentClick: (e: MouseEvent | TouchEvent | KeyboardEvent) => void;
47
- _setup(): void;
48
- private _offset;
49
- _calculatePositioning(): void;
50
37
  /**
51
38
  * Open Tap Target.
52
39
  */
@@ -55,4 +42,16 @@ export declare class TapTarget extends Component<TapTargetOptions> implements Op
55
42
  * Close Tap Target.
56
43
  */
57
44
  close: () => void;
45
+ private _setup;
46
+ private _ensureId;
47
+ private _labelFromHeading;
48
+ private _teardownDom;
49
+ private _setupEventHandlers;
50
+ private _removeEventHandlers;
51
+ private _handleThrottledResize;
52
+ private _handleOriginKeydown;
53
+ private _handleTargetToggle;
54
+ private _handleResize;
55
+ private _handlePopoverToggle;
56
+ private _calculatePositioning;
58
57
  }
@@ -1,6 +1,7 @@
1
1
  export * from './components';
2
+ export { Dialogs } from './behaviors/dialogs';
2
3
  export { Forms } from './behaviors/forms';
3
4
  export { Waves } from './behaviors/waves';
4
5
  export { AutoInit } from './components/registry';
5
6
  export type { AutoInitOptions } from './components/registry';
6
- export declare const version = "0.1.0";
7
+ export declare const version = "0.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expressivecss/expressive",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "ExpressiveCSS - a Material Design 3 front-end framework.",
5
5
  "license": "MIT",
6
6
  "author": "BaezFJ <baezdevs@gmail.com>",
@@ -195,6 +195,7 @@ unlayered declaration. Drop the flag from `.hide` and it stops beating a
195
195
  consumer's own `display` — silently, and in the common case. Classes whose whole
196
196
  job is to be unconditional (`.hide`, `.m-3`, the palette classes) keep it.
197
197
 
198
- The `!important` in `components/` is a different thing again: `.pushpin`,
199
- `.tap-target` and the preloader set JS-driven geometry that must not be
200
- overridable. Those stay too.
198
+ The `!important` in `components/` is a different thing again: `.pushpin`
199
+ and the preloader set JS-driven geometry that must not be overridable.
200
+ Those stay. Tap target placement is custom properties now, so it no
201
+ longer needs the flag.
@@ -48,9 +48,10 @@ header:has(> nav) nav a span.badge {
48
48
  -webkit-font-smoothing: auto;
49
49
  }
50
50
 
51
- // Line height centering
52
- .collection-item span.badge {
53
- margin-top: calc(calc(1.5rem * 0.5) - calc(var(--bagde-height) * 0.5));
51
+ .collection span.badge {
52
+ float: none;
53
+ margin-block: 0;
54
+ margin-inline-start: auto;
54
55
  }
55
56
 
56
57
  .collapsible span.badge {
@@ -62,7 +63,7 @@ header:has(> nav) nav a span.badge {
62
63
  }
63
64
  }
64
65
 
65
- .collapsible .active span.badge:not(.new) {
66
+ .collapsible :is(.active, [open]) span.badge:not(.new) {
66
67
  color: var(--md-sys-color-on-surface-variant);
67
68
  }
68
69