@citolab/qti-components 10.0.0-next.10 → 10.0.0-next.11
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.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1971 -641
- package/dist/{chunk-YYZCTIZY.js → chunk-454ZDSKX.js} +14 -11
- package/dist/chunk-454ZDSKX.js.map +1 -0
- package/dist/{chunk-CQ3WU35R.js → chunk-AJ5U5KXR.js} +2 -2
- package/dist/{chunk-Q3C7XFVS.js → chunk-AVZRY5SQ.js} +2 -2
- package/dist/{chunk-RRMCWCSA.js → chunk-KYNLY2ET.js} +115 -33
- package/dist/chunk-KYNLY2ET.js.map +1 -0
- package/dist/{chunk-WPILS3CW.js → chunk-N2CTFOIK.js} +2 -2
- package/dist/{chunk-AHULN3UB.js → chunk-O76BOKAP.js} +108 -30
- package/dist/chunk-O76BOKAP.js.map +1 -0
- package/dist/{chunk-3TUGZHKB.js → chunk-XXJAE6AP.js} +2 -2
- package/dist/chunk-YKXVAXSI.js +7 -0
- package/dist/chunk-YKXVAXSI.js.map +1 -0
- package/dist/corrections.d.ts +2 -2
- package/dist/corrections.js +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/interactions.d.ts +2 -2
- package/dist/interactions.js +2 -2
- package/dist/item.css +1579 -386
- package/dist/item.js +3 -3
- package/dist/qti-components-jsx.d.ts +6 -4
- package/dist/{qti-test.d-D-RYWphm.d.ts → qti-test.d-D5C7W8Lg.d.ts} +3 -2
- package/dist/{qti-text-entry-interaction.d-utFyp1DH.d.ts → qti-text-entry-interaction.d-CU-fAAD1.d.ts} +0 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-AHULN3UB.js.map +0 -1
- package/dist/chunk-QVZLJY75.js +0 -7
- package/dist/chunk-QVZLJY75.js.map +0 -1
- package/dist/chunk-RRMCWCSA.js.map +0 -1
- package/dist/chunk-YYZCTIZY.js.map +0 -1
- /package/dist/{chunk-CQ3WU35R.js.map → chunk-AJ5U5KXR.js.map} +0 -0
- /package/dist/{chunk-Q3C7XFVS.js.map → chunk-AVZRY5SQ.js.map} +0 -0
- /package/dist/{chunk-WPILS3CW.js.map → chunk-N2CTFOIK.js.map} +0 -0
- /package/dist/{chunk-3TUGZHKB.js.map → chunk-XXJAE6AP.js.map} +0 -0
package/dist/item.css
CHANGED
|
@@ -1462,6 +1462,10 @@
|
|
|
1462
1462
|
box-sizing: border-box;
|
|
1463
1463
|
}
|
|
1464
1464
|
|
|
1465
|
+
.qti-layout-row > [class*='qti-layout-col'] > :first-child {
|
|
1466
|
+
margin-block-start: 0; /* a heading or paragraph that opens a column starts at the column's top edge */
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1465
1469
|
.qti-layout-row [class*='qti-layout-col']:empty {
|
|
1466
1470
|
width: 0;
|
|
1467
1471
|
overflow: hidden; /* to fully collapse if there’s padding or borders */
|
|
@@ -1582,6 +1586,7 @@
|
|
|
1582
1586
|
*/
|
|
1583
1587
|
|
|
1584
1588
|
@layer qti-components.reset{
|
|
1589
|
+
|
|
1585
1590
|
@scope (qti-item-body, .ProseMirror) {
|
|
1586
1591
|
:scope,
|
|
1587
1592
|
:scope * {
|
|
@@ -1631,6 +1636,24 @@
|
|
|
1631
1636
|
margin: 0;
|
|
1632
1637
|
}
|
|
1633
1638
|
}
|
|
1639
|
+
|
|
1640
|
+
/*
|
|
1641
|
+
* Reading rhythm for rendered items.
|
|
1642
|
+
*
|
|
1643
|
+
* Browsers and normalize sheets leave the line height at about 1.15, which squashes every sentence
|
|
1644
|
+
* of an item against the next. Items set their own, from one token a host can re-value. The token is
|
|
1645
|
+
* derived from the height of an inline field, so a line holding one is no taller than the rest.
|
|
1646
|
+
* Rendered items only: an editor document keeps the line height its editor gives it.
|
|
1647
|
+
*/
|
|
1648
|
+
@scope (qti-item-body) {
|
|
1649
|
+
:scope {
|
|
1650
|
+
line-height: var(--qti-line-height);
|
|
1651
|
+
font-family: var(--cito-font-family, inherit); /* the page's font, unless a brand sets one */
|
|
1652
|
+
/* The theme's text colour, so the words flip with the surfaces when the page is dark. Inheriting
|
|
1653
|
+
the page's colour left dark text on the dark fields of a page that had not set its own. */
|
|
1654
|
+
color: var(--qti-color-base-content);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1634
1657
|
}
|
|
1635
1658
|
|
|
1636
1659
|
@layer qti-components.elements{
|
|
@@ -1679,7 +1702,7 @@
|
|
|
1679
1702
|
:scope td {
|
|
1680
1703
|
border: var(--qti-prose-table-border-width, var(--qti-border-thickness, 1px))
|
|
1681
1704
|
var(--qti-prose-table-border-style, var(--qti-border-style, solid))
|
|
1682
|
-
var(--qti-prose-table-border-color, var(--qti-border-color
|
|
1705
|
+
var(--qti-prose-table-border-color, var(--qti-border-color));
|
|
1683
1706
|
padding: var(--qti-prose-table-cell-padding, 0.25rem 0.5rem);
|
|
1684
1707
|
text-align: left;
|
|
1685
1708
|
/* No vertical-align here: that is layout, and the theme does not do layout (CONTRACT.md §7,
|
|
@@ -1687,7 +1710,7 @@
|
|
|
1687
1710
|
}
|
|
1688
1711
|
|
|
1689
1712
|
:scope th {
|
|
1690
|
-
background: var(--qti-prose-table-header-bg, var(--qti-bg-active
|
|
1713
|
+
background: var(--qti-prose-table-header-bg, var(--qti-bg-active));
|
|
1691
1714
|
font-weight: 600;
|
|
1692
1715
|
}
|
|
1693
1716
|
}
|
|
@@ -1703,6 +1726,11 @@
|
|
|
1703
1726
|
* token declared in `global` is readable from a rule in any layer, and `var()` substitution across
|
|
1704
1727
|
* these blocks (--qti-correct reads --qti-success) is layer-independent. Nothing here renders
|
|
1705
1728
|
* differently for being grouped this way.
|
|
1729
|
+
*
|
|
1730
|
+
* Tiers (CONTRACT.md §8): a token tagged `t1` is a brand knob and the only kind that holds a
|
|
1731
|
+
* literal; every other token here is tier 2, derived from tier 1. Every block is declared on
|
|
1732
|
+
* `:root, :host, [data-qti-theme]`, so a subtree themed with `data-qti-theme` re-derives tier 2 from
|
|
1733
|
+
* its own tier 1.
|
|
1706
1734
|
*/
|
|
1707
1735
|
|
|
1708
1736
|
/* ============================================================================
|
|
@@ -1710,16 +1738,125 @@
|
|
|
1710
1738
|
* ========================================================================== */
|
|
1711
1739
|
@layer qti-components.global {
|
|
1712
1740
|
:root,
|
|
1713
|
-
:host
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1741
|
+
:host,
|
|
1742
|
+
[data-qti-theme] {
|
|
1743
|
+
/*
|
|
1744
|
+
* ── Tier 1: the theme ──────────────────────────────────────────────────────────────────────
|
|
1745
|
+
*
|
|
1746
|
+
* Modelled on a daisyUI theme block. Setting these, and nothing else, makes a complete theme;
|
|
1747
|
+
* every other token in this file is derived from them (CONTRACT.md §8). They are the public
|
|
1748
|
+
* styling API, so they carry the public prefix, `cito-`, like the `cito-` events. Everything
|
|
1749
|
+
* derived from them keeps `qti-`.
|
|
1750
|
+
*
|
|
1751
|
+
* Colours are written in oklch. Each `-content` colour is the one that reads ON its partner:
|
|
1752
|
+
* text on a primary fill, a label on a neutral button, the text of a chip. base-100 is the
|
|
1753
|
+
* surface an item sits on; base-content is what is drawn against it.
|
|
1754
|
+
*
|
|
1755
|
+
* Light and dark are one set. The base and neutral colours are `light-dark()`, so they follow
|
|
1756
|
+
* the `color-scheme` of the page around the item. The theme sets no `color-scheme` itself: a
|
|
1757
|
+
* page that declares none stays light. The semantic colours are one value for both.
|
|
1758
|
+
*
|
|
1759
|
+
* The default theme is black and white: the surface is white (light) or near-black (dark), and
|
|
1760
|
+
* the primary, which marks what is selected, active or focused, is the text colour itself, so a
|
|
1761
|
+
* selected choice is a black fill with white text, and white on black in dark mode. Only the
|
|
1762
|
+
* four state colours carry hue, because they carry meaning: the answer key, correct, partially
|
|
1763
|
+
* correct, incorrect. A brand sets its colour through --cito-color-primary. Today's names below
|
|
1764
|
+
* are aliases of these.
|
|
1765
|
+
*
|
|
1766
|
+
* HOW THEY ARE READ. The theme never declares a `--cito-*` name. Each line below reads one, with
|
|
1767
|
+
* the default as its fallback, into the `--qti-` name every rule uses:
|
|
1768
|
+
*
|
|
1769
|
+
* --qti-color-primary: var(--cito-color-primary, oklch(…));
|
|
1770
|
+
*
|
|
1771
|
+
* An undeclared custom property inherits through every shadow boundary, so a `--cito-*` value a
|
|
1772
|
+
* host sets anywhere above an item reaches it, also inside a shadow root that adopts this sheet
|
|
1773
|
+
* (test-container, an item's own root). Declaring the `--cito-*` names here, on `:host`, would
|
|
1774
|
+
* reset them to the defaults in every such root. Two inputs have no `--qti-` line because their
|
|
1775
|
+
* default is `inherit`, which a custom property cannot hold: --cito-color-chip-content (read in
|
|
1776
|
+
* `@mixin drag`) and --cito-font-family (read in reset.css). The optional --cito-color-border is
|
|
1777
|
+
* read by --qti-border-color, below.
|
|
1778
|
+
*/
|
|
1779
|
+
--qti-color-base-100: var(--cito-color-base-100, light-dark(oklch(100% 0 none), oklch(20% 0 none))); /* t1 */
|
|
1780
|
+
--qti-color-base-content: var(--cito-color-base-content, light-dark(oklch(21% 0 none), oklch(96% 0 none))); /* t1 */
|
|
1781
|
+
|
|
1782
|
+
--qti-color-primary: var(
|
|
1783
|
+
--cito-color-primary,
|
|
1784
|
+
light-dark(oklch(21% 0 none), oklch(96% 0 none))
|
|
1785
|
+
); /* t1 — selection, active border, focus ring */
|
|
1786
|
+
--qti-color-primary-content: var(
|
|
1787
|
+
--cito-color-primary-content,
|
|
1788
|
+
light-dark(oklch(100% 0 none), oklch(21% 0 none))
|
|
1789
|
+
); /* t1 */
|
|
1790
|
+
|
|
1791
|
+
/* The colour of an unbranded control that still has to stand out: the test's Next button. */
|
|
1792
|
+
--qti-color-neutral: var(--cito-color-neutral, light-dark(oklch(17.76% 0 none), oklch(92% 0 none))); /* t1 */
|
|
1793
|
+
--qti-color-neutral-content: var(
|
|
1794
|
+
--cito-color-neutral-content,
|
|
1795
|
+
light-dark(oklch(100% 0 none), oklch(17.76% 0 none))
|
|
1796
|
+
); /* t1 */
|
|
1797
|
+
|
|
1798
|
+
/*
|
|
1799
|
+
* A drag chip: the surface by default, so a chip is an outlined box; a brand that wants filled
|
|
1800
|
+
* chips sets its own colour here. Its text is the surrounding text unless a brand says otherwise.
|
|
1801
|
+
*/
|
|
1802
|
+
--qti-color-chip: var(--cito-color-chip, var(--qti-color-base-100)); /* t1 */
|
|
1803
|
+
|
|
1804
|
+
--qti-color-info: var(--cito-color-info, oklch(56.14% 0.1437 245.8)); /* t1 — the answer key */
|
|
1805
|
+
--qti-color-success: var(--cito-color-success, oklch(53.64% 0.166 139.96)); /* t1 — correct */
|
|
1806
|
+
--qti-color-warning: var(--cito-color-warning, oklch(79.62% 0.1708 71.71)); /* t1 — partially correct, validation */
|
|
1807
|
+
--qti-color-error: var(--cito-color-error, oklch(56.75% 0.2329 29.23)); /* t1 — incorrect */
|
|
1808
|
+
|
|
1809
|
+
/*
|
|
1810
|
+
* Radii, by what a box is: a selector is a small thing you pick (checkbox, chip), a field is a
|
|
1811
|
+
* thing you type or choose in (text entry, choice, dropdown), a box holds content (menu, modal,
|
|
1812
|
+
* rubric, validation message).
|
|
1813
|
+
*
|
|
1814
|
+
* Selector and box default to the field radius, read through its old name, so a brand that sets
|
|
1815
|
+
* --qti-border-radius still rounds all three.
|
|
1816
|
+
*/
|
|
1817
|
+
--qti-radius-field: var(--cito-radius-field, 0.2rem); /* t1 */
|
|
1818
|
+
--qti-radius-selector: var(--cito-radius-selector, var(--qti-border-radius)); /* t1 */
|
|
1819
|
+
--qti-radius-box: var(--cito-radius-box, var(--qti-border-radius)); /* t1 */
|
|
1820
|
+
|
|
1821
|
+
/*
|
|
1822
|
+
* Sizes. The selector unit is a quarter of a radio or checkbox (`em`, so a control follows the
|
|
1823
|
+
* text it labels; see --qti-control-size). The field unit is an inline field's block padding:
|
|
1824
|
+
* the room above and below the text in a text entry, an inline choice or a gap.
|
|
1825
|
+
*/
|
|
1826
|
+
--qti-size-selector: var(--cito-size-selector, 0.25em); /* t1 */
|
|
1827
|
+
--qti-size-field: var(--cito-size-field, 0.125rem); /* t1 */
|
|
1828
|
+
|
|
1829
|
+
/* The width of every border. A hairline, so a length in px. */
|
|
1830
|
+
--qti-border-width: var(--cito-border-width, 1px); /* t1 */
|
|
1831
|
+
|
|
1832
|
+
/*
|
|
1833
|
+
* Depth: 0 or 1. At 1 a chip stands off the page with a small lift under it; at 0 (the default)
|
|
1834
|
+
* it is flat. A multiplier, like --qti-motion, so it can also be set in between.
|
|
1835
|
+
*/
|
|
1836
|
+
--qti-depth: var(--cito-depth, 0); /* t1 */
|
|
1837
|
+
|
|
1838
|
+
/*
|
|
1839
|
+
* Two surfaces a step darker than base-100, derived so the three cannot drift apart: a little
|
|
1840
|
+
* base-content mixed in (2.5% and 6% reproduce the 98% and 95% greys of the light default).
|
|
1841
|
+
*/
|
|
1842
|
+
--qti-color-base-200: color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) 2.5%);
|
|
1843
|
+
--qti-color-base-300: color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) 6%);
|
|
1844
|
+
|
|
1845
|
+
/* What a disabled interaction is drawn in: text, edges, controls and the selected mark, all one
|
|
1846
|
+
muted grey (interactions/qti-disabled.css). 40% of the text colour into the surface; WCAG
|
|
1847
|
+
exempts disabled controls from contrast, and this keeps them readable but plainly off. */
|
|
1848
|
+
--qti-color-disabled: color-mix(in oklab, var(--qti-color-base-content) 40%, var(--qti-color-base-100));
|
|
1849
|
+
|
|
1850
|
+
/* ── Today's names, as aliases of tier 1 ──
|
|
1851
|
+
Rules and components read these, so a brand that sets one still wins. */
|
|
1852
|
+
--qti-primary: var(--qti-color-primary);
|
|
1853
|
+
--qti-success: var(--qti-color-success);
|
|
1854
|
+
--qti-warning: var(--qti-color-warning);
|
|
1855
|
+
--qti-error: var(--qti-color-error);
|
|
1856
|
+
--qti-info: var(--qti-color-info);
|
|
1720
1857
|
|
|
1721
1858
|
/* Foreground on a primary fill. */
|
|
1722
|
-
--qti-primary-fg:
|
|
1859
|
+
--qti-primary-fg: var(--qti-color-primary-content);
|
|
1723
1860
|
|
|
1724
1861
|
/* ── Rhythm ──
|
|
1725
1862
|
*
|
|
@@ -1760,18 +1897,57 @@
|
|
|
1760
1897
|
*
|
|
1761
1898
|
* Widening boxes without touching the vertical rhythm means re-declaring --qti-padding-box,
|
|
1762
1899
|
* which is deliberate: that is a different look, not a different unit. */
|
|
1763
|
-
--qti-spacing: 0.5rem;
|
|
1900
|
+
--qti-spacing: 0.5rem; /* t1 */
|
|
1764
1901
|
--qti-padding-box: var(--qti-spacing) calc(var(--qti-spacing) * 2);
|
|
1765
1902
|
--qti-padding-inline: calc(var(--qti-spacing) / 4) calc(var(--qti-spacing) / 2);
|
|
1766
1903
|
--qti-gap: calc(var(--qti-spacing) * 2);
|
|
1767
1904
|
|
|
1905
|
+
/*
|
|
1906
|
+
* Inline fields: a text entry, an inline choice, a gap, anything that sits in a line of text.
|
|
1907
|
+
*
|
|
1908
|
+
* Named, not computed at the call site (the contract above): they are the quarter-unit values
|
|
1909
|
+
* the three composites do not offer, and each is read whole.
|
|
1910
|
+
*
|
|
1911
|
+
* --qti-inline-gap space either side of the field, so it never touches the words
|
|
1912
|
+
* around it; the sentence's own space supplies the rest and
|
|
1913
|
+
* collapses at a line break, where a margin would leave an indent
|
|
1914
|
+
* --qti-inline-padding-block the field's block padding: a quarter unit, so the line holding a
|
|
1915
|
+
* field stays near the height of the lines around it
|
|
1916
|
+
* --qti-inline-padding-inline the field's inline padding: one spacing unit, half the padding a
|
|
1917
|
+
* block box gets (--qti-gap), so a field in a sentence stays compact
|
|
1918
|
+
* without its text touching the side edges
|
|
1919
|
+
* --qti-inline-field-padding the field's box, those two together
|
|
1920
|
+
*
|
|
1921
|
+
* --qti-line-height is derived from the same parts, so a line of text is exactly as tall as a
|
|
1922
|
+
* field set in it: a field line then sits level with the lines around it. It is a length, so it
|
|
1923
|
+
* is the same in every element of the item, whatever its font size.
|
|
1924
|
+
*/
|
|
1925
|
+
--qti-inline-gap: calc(var(--qti-spacing) / 4);
|
|
1926
|
+
--qti-inline-padding-block: var(--qti-size-field);
|
|
1927
|
+
--qti-inline-padding-inline: var(--qti-spacing);
|
|
1928
|
+
--qti-inline-field-padding: var(--qti-inline-padding-block) var(--qti-inline-padding-inline);
|
|
1929
|
+
--qti-line-height: calc(
|
|
1930
|
+
var(--qti-field-line-height) * 1em + 2 * var(--qti-inline-padding-block) + 2 * var(--qti-component-border-width)
|
|
1931
|
+
);
|
|
1932
|
+
|
|
1933
|
+
/*
|
|
1934
|
+
* How far a stacked choice is pulled out toward the edge of the prose around it: the room it
|
|
1935
|
+
* reserves for its selected paint, which is its inline padding (--qti-gap, the inline half of
|
|
1936
|
+
* --qti-padding-box) and its border, less the reach of the focus ring round its radio or
|
|
1937
|
+
* checkbox. The control then sits just inside the prose edge, so its ring stays inside the
|
|
1938
|
+
* column instead of being cut off by it.
|
|
1939
|
+
*/
|
|
1940
|
+
--qti-choice-outdent: calc(
|
|
1941
|
+
var(--qti-gap) + var(--qti-component-border-width) - var(--qti-focus-offset) - var(--qti-focus-border-width)
|
|
1942
|
+
);
|
|
1943
|
+
|
|
1768
1944
|
--qti-popover-z-index: 1000;
|
|
1769
1945
|
--qti-overlay-z-index: 1;
|
|
1770
1946
|
/* Motion master switch — a unitless multiplier every animation scales by. 1 = normal, 0 = no
|
|
1771
1947
|
motion. CSS transitions read it through the calc below; the drag-drop FLIP engine reads
|
|
1772
1948
|
--qti-motion directly (see flip.utils.ts resolveMotionScale), so this one token silences both
|
|
1773
1949
|
CSS motion and JS FLIP. A theme or PNP profile can set 0.5 to slow motion or 0 to stop it. */
|
|
1774
|
-
--qti-motion: 1;
|
|
1950
|
+
--qti-motion: 1; /* t1 */
|
|
1775
1951
|
--qti-motion-duration-fast: calc(150ms * var(--qti-motion));
|
|
1776
1952
|
|
|
1777
1953
|
/* ── The component surface ──
|
|
@@ -1780,7 +1956,7 @@
|
|
|
1780
1956
|
slider track). Those two readerships are why this group and the --qti-component-* group below
|
|
1781
1957
|
are not one group: this is "the theme's surface colour", that is "what a component paints when
|
|
1782
1958
|
it says nothing", and only the second is the paint contract's business. */
|
|
1783
|
-
--qti-bg:
|
|
1959
|
+
--qti-bg: var(--qti-color-base-100);
|
|
1784
1960
|
|
|
1785
1961
|
/*
|
|
1786
1962
|
* THE body text colour — the foreground half of the --qti-bg / --qti-fg pair.
|
|
@@ -1804,13 +1980,36 @@
|
|
|
1804
1980
|
* Every reader is a colour context, which is what makes the keyword safe: it reaches `color`
|
|
1805
1981
|
* either directly or through a role slot (--field-color, --drag-color, @mixin candidate).
|
|
1806
1982
|
*/
|
|
1807
|
-
--qti-fg: inherit;
|
|
1808
|
-
--qti-border-thickness:
|
|
1809
|
-
--qti-border-style: solid;
|
|
1810
|
-
|
|
1811
|
-
|
|
1983
|
+
--qti-fg: inherit; /* t1 */
|
|
1984
|
+
--qti-border-thickness: var(--qti-border-width); /* some places need the width alone (invariance, calcs) */
|
|
1985
|
+
--qti-border-style: solid; /* t1 */
|
|
1986
|
+
/*
|
|
1987
|
+
* THE border colour, the border half of the --qti-bg / --qti-fg pair. A neutral, worked out from
|
|
1988
|
+
* the base colours: base-content mixed into the surface, just far enough (about 3.3:1 on white) to
|
|
1989
|
+
* meet the 3:1 WCAG asks of a field's edge. It was the primary colour, which drew every field,
|
|
1990
|
+
* table and drop in the brand's blue at rest; the primary now marks only what is active or
|
|
1991
|
+
* selected (--qti-border-active). A brand that wants its colour on every edge sets this token,
|
|
1992
|
+
* as kennisnet.css does.
|
|
1993
|
+
*/
|
|
1994
|
+
--qti-border-color: var(
|
|
1995
|
+
--cito-color-border,
|
|
1996
|
+
color-mix(in oklab, var(--qti-color-base-content) 45%, var(--qti-color-base-100))
|
|
1997
|
+
); /* t1 input: --cito-color-border, optional */
|
|
1998
|
+
--qti-border-radius: var(--qti-radius-field);
|
|
1812
1999
|
--qti-border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
1813
2000
|
|
|
2001
|
+
/* The QTI 3 shared CSS (qti-native/qti3p0.css, vocabulary §2.12) leaves the colours of
|
|
2002
|
+
.qti-bordered, .qti-underline and .qti-well to these hooks and defines none of them, so
|
|
2003
|
+
without the theme a well got its padding and nothing else. Filled from the theme's own
|
|
2004
|
+
tokens: a brand that restyles its borders restyles the well and the bordered box with them.
|
|
2005
|
+
A well is a tinted surface inside the theme's border (§1.1.6.2: border plus background, the
|
|
2006
|
+
background chosen by the platform); base-200 is the theme's tint for that. */
|
|
2007
|
+
--table-border-color: var(--qti-border-color);
|
|
2008
|
+
--foreground: var(--qti-color-base-content);
|
|
2009
|
+
--well-bg: var(--qti-color-base-200);
|
|
2010
|
+
--well-border: var(--qti-border);
|
|
2011
|
+
--well-box-shadow: none;
|
|
2012
|
+
|
|
1814
2013
|
/* ── The paint contract's resting look ──
|
|
1815
2014
|
*
|
|
1816
2015
|
* One token per PAINT property, and the whole of what a role paints when it sets nothing. These
|
|
@@ -1844,6 +2043,32 @@
|
|
|
1844
2043
|
--qti-component-opacity: 1;
|
|
1845
2044
|
--qti-component-filter: none;
|
|
1846
2045
|
|
|
2046
|
+
/*
|
|
2047
|
+
* Depth, worked out from --cito-depth (tier 1).
|
|
2048
|
+
*
|
|
2049
|
+
* --qti-drag-lift a chip at rest: a hard shadow under it, as tall as two borders. At
|
|
2050
|
+
* depth 0 its colour mixes to nothing, so the chip is flat.
|
|
2051
|
+
* --qti-drag-elevation a chip in flight, at any depth: picked up is always off the page. A
|
|
2052
|
+
* theme sets its own with --cito-shadow-drag (`none` for flat).
|
|
2053
|
+
* --qti-hover-mix how much base-content a hover mixes into a fill.
|
|
2054
|
+
* --qti-active-mix how much a press mixes in: twice the hover, so a press reads as one.
|
|
2055
|
+
*/
|
|
2056
|
+
--qti-drag-lift: 0 calc(2 * var(--qti-border-width)) 0
|
|
2057
|
+
color-mix(in oklab, var(--qti-color-base-content) calc(var(--qti-depth) * 20%), transparent);
|
|
2058
|
+
--qti-drag-elevation: var(
|
|
2059
|
+
--cito-shadow-drag,
|
|
2060
|
+
0 var(--qti-spacing) calc(var(--qti-spacing) * 1.5)
|
|
2061
|
+
color-mix(in oklab, var(--qti-color-base-content) 20%, transparent),
|
|
2062
|
+
0 calc(var(--qti-spacing) / 2) var(--qti-spacing)
|
|
2063
|
+
color-mix(in oklab, var(--qti-color-base-content) 10%, transparent)
|
|
2064
|
+
); /* t1 input: --cito-shadow-drag, optional */
|
|
2065
|
+
--qti-hover-mix: 8%;
|
|
2066
|
+
|
|
2067
|
+
/* A chip's resting fill: the tier-1 chip colour. `press` reads --qti-<role>-fill, so a pressed
|
|
2068
|
+
chip darkens from the chip colour; other roles fall back to the component surface. */
|
|
2069
|
+
--qti-drag-fill: var(--qti-color-chip);
|
|
2070
|
+
--qti-active-mix: 16%; /* a press: the same mix, twice as far */
|
|
2071
|
+
|
|
1847
2072
|
/* Interaction icon masks. Kept in the QTI namespace so the theme has no FontAwesome runtime
|
|
1848
2073
|
dependency. One vocabulary, kept together even though --qti-times-mask is read only from
|
|
1849
2074
|
the corrections layer. */
|
|
@@ -1853,7 +2078,12 @@
|
|
|
1853
2078
|
A SHAPE rather than a shade, deliberately — colour alone would leave partial credit
|
|
1854
2079
|
indistinguishable from correct for a colour-blind candidate, or in greyscale print. */
|
|
1855
2080
|
--qti-partial-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z'/%3E%3C/svg%3E");
|
|
1856
|
-
|
|
2081
|
+
/* The drag handle (`@mixin grip`): six small round dots by default, a theme sets its own shape
|
|
2082
|
+
with --cito-icon-drag (a mask) and its colour with --cito-color-drag-icon. */
|
|
2083
|
+
--qti-grip-mask: var(
|
|
2084
|
+
--cito-icon-drag,
|
|
2085
|
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16'%3E%3Ccircle cx='3' cy='3' r='1.4'/%3E%3Ccircle cx='7' cy='3' r='1.4'/%3E%3Ccircle cx='3' cy='8' r='1.4'/%3E%3Ccircle cx='7' cy='8' r='1.4'/%3E%3Ccircle cx='3' cy='13' r='1.4'/%3E%3Ccircle cx='7' cy='13' r='1.4'/%3E%3C/svg%3E")
|
|
2086
|
+
); /* t1 input: --cito-icon-drag, optional */
|
|
1857
2087
|
--qti-chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3E%3C/svg%3E");
|
|
1858
2088
|
|
|
1859
2089
|
/*
|
|
@@ -1867,26 +2097,29 @@
|
|
|
1867
2097
|
* Deliberately in `global`: they are read from both interactions.base and interactions.states,
|
|
1868
2098
|
* so no single interaction layer could own them.
|
|
1869
2099
|
*/
|
|
1870
|
-
--qti-bg-active: color-mix(in
|
|
2100
|
+
--qti-bg-active: color-mix(in oklab, var(--qti-primary) 8%, var(--qti-bg));
|
|
1871
2101
|
--qti-border-active: var(--qti-primary);
|
|
1872
2102
|
|
|
1873
|
-
/*
|
|
2103
|
+
/*
|
|
2104
|
+
* The focus ring (`@mixin foc`): one outline on `:focus-visible`, for everything. The test
|
|
2105
|
+
* controls read the same two tokens, so a page has one ring.
|
|
2106
|
+
*
|
|
2107
|
+
* Primary, not the answer key's info blue: a ring is the brand's "you are here", and it must not
|
|
2108
|
+
* be mistaken for the answer key. 2px, a hairline, so a length in px. It sits that far outside
|
|
2109
|
+
* the box, or that far inside it for a row in a list that clips (`@mixin foc-inset`).
|
|
1874
2110
|
*
|
|
1875
|
-
* focus → a single :focus-visible outline (no vars)
|
|
1876
|
-
* Two treatments already read these two tokens: `@mixin foc` draws a box-shadow, while
|
|
1877
|
-
* hotspot and graphic-order draw an outline. The box-shadow half is the problem — four
|
|
1878
|
-
* rules contest that one property on a drag (the resting lift, the in-flight elevation,
|
|
1879
|
-
* the placeholder's inset, the focus ring) and the last one declared wins, so focusing a
|
|
1880
|
-
* drag mid-interaction drops either its ring or its elevation. An outline joins no such
|
|
1881
|
-
* fight and costs no layout. The theme also still says `:focus` 24 times against
|
|
1882
|
-
* `:focus-visible` 10, so most rings show on mouse click too. Once it is an outline on
|
|
1883
|
-
* :focus-visible, a width and a colour are not worth tokenising.
|
|
1884
2111
|
* The four --qti-light-* and --qti-dark-* tokens that used to sit here are now
|
|
1885
2112
|
* --qti-selections-*, in the interactions.states block below. They are not a page-level light
|
|
1886
2113
|
* and dark theme, which is what the old names suggested and why they were mistaken for dead.
|
|
1887
2114
|
*/
|
|
1888
2115
|
--qti-focus-border-width: 2px;
|
|
1889
|
-
--qti-focus-color: var(--qti-
|
|
2116
|
+
--qti-focus-color: var(--qti-primary);
|
|
2117
|
+
--qti-focus-offset: var(--qti-focus-border-width);
|
|
2118
|
+
--qti-focus-offset-inset: calc(-1 * var(--qti-focus-border-width));
|
|
2119
|
+
--qti-focus-offset-past-border: calc(var(--qti-focus-offset) + var(--qti-border-width));
|
|
2120
|
+
|
|
2121
|
+
/* A drop edge drawn as an outline lies exactly where a border would (an inline gap). */
|
|
2122
|
+
--qti-drop-outline-offset: calc(-1 * var(--qti-border-width));
|
|
1890
2123
|
}
|
|
1891
2124
|
|
|
1892
2125
|
/* Honour the OS "reduce motion" request through the same knob, so CSS transitions and the JS FLIP
|
|
@@ -1894,7 +2127,8 @@
|
|
|
1894
2127
|
with higher specificity. */
|
|
1895
2128
|
@media (prefers-reduced-motion: reduce) {
|
|
1896
2129
|
:root,
|
|
1897
|
-
:host
|
|
2130
|
+
:host,
|
|
2131
|
+
[data-qti-theme] {
|
|
1898
2132
|
--qti-motion: 0;
|
|
1899
2133
|
}
|
|
1900
2134
|
}
|
|
@@ -1905,7 +2139,8 @@
|
|
|
1905
2139
|
* ========================================================================== */
|
|
1906
2140
|
@layer qti-components.interactions.base {
|
|
1907
2141
|
:root,
|
|
1908
|
-
:host
|
|
2142
|
+
:host,
|
|
2143
|
+
[data-qti-theme] {
|
|
1909
2144
|
/*
|
|
1910
2145
|
* The radio/checkbox box. Named for what it is — every other name around it already says
|
|
1911
2146
|
* "control": part="control", part="control-mark", the control-selected mixin. "form" was the odd
|
|
@@ -1926,7 +2161,11 @@
|
|
|
1926
2161
|
* shrinks with it. Nothing in the theme sets a smaller size yet, so a floor would be a magic
|
|
1927
2162
|
* number guarding a case that does not exist; add `max()` here if a real one turns up.
|
|
1928
2163
|
*/
|
|
1929
|
-
|
|
2164
|
+
/* Snapped to an even number of pixels, as are the marks drawn inside it (`mark-size`,
|
|
2165
|
+
`radio-checked`): with a fractional control (19.2px at Playful's 0.3em) the gap round the dot
|
|
2166
|
+
is fractional too, and the ring and the dot antialias differently, so the dot looks off
|
|
2167
|
+
centre although it is not. Even sizes keep every gap a whole pixel. 16px is unchanged. */
|
|
2168
|
+
--qti-control-size: round(calc(var(--qti-size-selector) * 4), 2px);
|
|
1930
2169
|
|
|
1931
2170
|
/* The correction badge's box. Named in two comments above and read by correction.styles.ts, but
|
|
1932
2171
|
never actually declared until now — every badge has been running on that file's `1em`
|
|
@@ -1954,10 +2193,10 @@
|
|
|
1954
2193
|
/* The line-height @mixin field-typography gives a field. A token because the correction badge
|
|
1955
2194
|
has to be exactly one field-line tall to centre on the text, and `1lh` cannot be used for it:
|
|
1956
2195
|
that unit resolves against the badge's own inherited line-height, not the field's. */
|
|
1957
|
-
--qti-field-line-height: 1.5;
|
|
2196
|
+
--qti-field-line-height: 1.5; /* t1 */
|
|
1958
2197
|
|
|
1959
2198
|
/*
|
|
1960
|
-
* The
|
|
2199
|
+
* The gutter at the end of the line a multi-line field reserves for its correction badge.
|
|
1961
2200
|
*
|
|
1962
2201
|
* DERIVED, so it cannot drift from the thing it makes room for: the badge's own inset, plus the
|
|
1963
2202
|
* badge, plus the gap that separates it from the first character. It used to be a literal
|
|
@@ -2054,7 +2293,7 @@
|
|
|
2054
2293
|
--qti-hotspot-ring-color is intentionally NOT defined here: it is neutral by default and set
|
|
2055
2294
|
contextually by the qti-selections-* classes and the correction states. */
|
|
2056
2295
|
--qti-hotspot-ring-width: 2px;
|
|
2057
|
-
--qti-hotspot-halo:
|
|
2296
|
+
--qti-hotspot-halo: oklch(100% 0 none / 85%);
|
|
2058
2297
|
|
|
2059
2298
|
/*
|
|
2060
2299
|
* A drag's own padding, deliberately not --qti-padding-box.
|
|
@@ -2067,8 +2306,15 @@
|
|
|
2067
2306
|
* the old `chip` paid `0.8em`, and which one you got depended on the layer the call site
|
|
2068
2307
|
* happened to sit in. That is the associate bug recorded in drag-drop.invariance.spec.ts — one
|
|
2069
2308
|
* drag, two box models, depending on where it was standing.
|
|
2309
|
+
*
|
|
2310
|
+
* Compact: three quarters of a spacing unit above and below, one and a half either side (6px ×
|
|
2311
|
+
* 12px at the default unit), with the field line height (`@mixin drag`), so a chip is a
|
|
2312
|
+
* word-sized box rather than a button. It was a whole unit by 0.8em. A choice drawn as a box takes the same, so a list of
|
|
2313
|
+
* buttons and a bank of chips read as the same kind of thing. Gap match goes tighter still: its
|
|
2314
|
+
* chips sit in a sentence (--qti-inline-field-padding).
|
|
2070
2315
|
*/
|
|
2071
|
-
--qti-drag-padding: var(--qti-spacing) 0.
|
|
2316
|
+
--qti-drag-padding: calc(var(--qti-spacing) * 0.75) calc(var(--qti-spacing) * 1.5);
|
|
2317
|
+
--qti-choice-box-padding: var(--qti-drag-padding);
|
|
2072
2318
|
}
|
|
2073
2319
|
}
|
|
2074
2320
|
|
|
@@ -2077,14 +2323,15 @@
|
|
|
2077
2323
|
* ========================================================================== */
|
|
2078
2324
|
@layer qti-components.interactions.states {
|
|
2079
2325
|
:root,
|
|
2080
|
-
:host
|
|
2326
|
+
:host,
|
|
2327
|
+
[data-qti-theme] {
|
|
2081
2328
|
/* Selection is a semantic alias of the primary action colour. */
|
|
2082
2329
|
--qti-selected-bg: var(--qti-primary);
|
|
2083
2330
|
--qti-selected-color: var(--qti-primary-fg);
|
|
2084
2331
|
|
|
2085
2332
|
/* The hole a lifted / placed chip leaves — derived from primary. */
|
|
2086
|
-
--qti-placeholder-bg: color-mix(in
|
|
2087
|
-
--qti-placeholder-shadow: 0 4px color-mix(in
|
|
2333
|
+
--qti-placeholder-bg: color-mix(in oklab, var(--qti-primary) 20%, var(--qti-bg));
|
|
2334
|
+
--qti-placeholder-shadow: 0 4px color-mix(in oklab, var(--qti-primary) 30%, var(--qti-bg));
|
|
2088
2335
|
|
|
2089
2336
|
/*
|
|
2090
2337
|
* Selections theming, for the two interactions Appendix B.1 of the QTI 3 implementation guide
|
|
@@ -2100,10 +2347,10 @@
|
|
|
2100
2347
|
* feature, and `global` claimed an ownership they never had — nothing outside these two
|
|
2101
2348
|
* interactions' state rules reads them.
|
|
2102
2349
|
*/
|
|
2103
|
-
--qti-selections-light-bg:
|
|
2104
|
-
--qti-selections-light-border:
|
|
2105
|
-
--qti-selections-dark-bg:
|
|
2106
|
-
--qti-selections-dark-border:
|
|
2350
|
+
--qti-selections-light-bg: oklch(95.51% 0 none);
|
|
2351
|
+
--qti-selections-light-border: oklch(85.76% 0 none);
|
|
2352
|
+
--qti-selections-dark-bg: oklch(27.81% 0.0296 256.85);
|
|
2353
|
+
--qti-selections-dark-border: oklch(55.44% 0.0407 257.42);
|
|
2107
2354
|
|
|
2108
2355
|
/* A drop-zone highlight is a background FILL only — no border, no ring — which keeps it
|
|
2109
2356
|
layout-invariant for free (a fill never reflows; the old inset ring existed only to avoid the
|
|
@@ -2113,7 +2360,7 @@
|
|
|
2113
2360
|
--qti-drop-highlight-border-color / -border-width stay ONLY for the chip-in-flight outline
|
|
2114
2361
|
(the dragging / return-anchor states), which marks the dragged element, not the zone. */
|
|
2115
2362
|
--qti-drop-highlight-bg: var(--qti-bg-active);
|
|
2116
|
-
--qti-drop-highlight-enabled-bg: color-mix(in
|
|
2363
|
+
--qti-drop-highlight-enabled-bg: color-mix(in oklab, var(--qti-drop-highlight-bg) 50%, transparent);
|
|
2117
2364
|
--qti-drop-highlight-border-color: var(--qti-border-active);
|
|
2118
2365
|
--qti-drop-highlight-border-width: 2px;
|
|
2119
2366
|
}
|
|
@@ -2124,18 +2371,19 @@
|
|
|
2124
2371
|
* ========================================================================== */
|
|
2125
2372
|
@layer qti-components.interactions.corrections {
|
|
2126
2373
|
:root,
|
|
2127
|
-
:host
|
|
2374
|
+
:host,
|
|
2375
|
+
[data-qti-theme] {
|
|
2128
2376
|
/* ── Correction — derived from the semantic colours, never set directly. ── */
|
|
2129
2377
|
--qti-correct: var(--qti-success);
|
|
2130
2378
|
--qti-incorrect: var(--qti-error);
|
|
2131
2379
|
--qti-partially-correct: var(--qti-warning);
|
|
2132
|
-
--qti-correct-light: color-mix(in
|
|
2133
|
-
--qti-incorrect-light: color-mix(in
|
|
2134
|
-
--qti-partially-correct-light: color-mix(in
|
|
2380
|
+
--qti-correct-light: color-mix(in oklab, var(--qti-correct) 5%, var(--qti-bg));
|
|
2381
|
+
--qti-incorrect-light: color-mix(in oklab, var(--qti-incorrect) 5%, var(--qti-bg));
|
|
2382
|
+
--qti-partially-correct-light: color-mix(in oklab, var(--qti-partially-correct) 5%, var(--qti-bg));
|
|
2135
2383
|
|
|
2136
2384
|
/* The answer key — the info blue, deliberately NOT the correct green. */
|
|
2137
2385
|
--qti-answer-fg: var(--qti-info);
|
|
2138
|
-
--qti-answer-bg: color-mix(in
|
|
2386
|
+
--qti-answer-bg: color-mix(in oklab, var(--qti-info) 5%, var(--qti-bg));
|
|
2139
2387
|
--qti-answer-border: var(--qti-info);
|
|
2140
2388
|
}
|
|
2141
2389
|
}
|
|
@@ -2245,6 +2493,28 @@
|
|
|
2245
2493
|
* rather than leaning on the glyph's intrinsic size.
|
|
2246
2494
|
*/
|
|
2247
2495
|
|
|
2496
|
+
/*
|
|
2497
|
+
* An element that sits in a line of text: a text entry, an inline choice, a gap, a hottext. They all
|
|
2498
|
+
* get the same box, so a sentence holding several of them stays level: space either side, the field
|
|
2499
|
+
* line height, and the inline-field padding (2px above and below, one spacing unit either side). Its
|
|
2500
|
+
* line is then exactly --qti-line-height tall, like every other line of the item.
|
|
2501
|
+
*
|
|
2502
|
+
* The padding is declared as --qti-padding-box, which the parts of a text entry and an inline choice
|
|
2503
|
+
* already read, so no component has to know about it. An element that pays its own padding (a
|
|
2504
|
+
* hottext) reads --qti-inline-field-padding directly; a gap is sized by the chip in it, which
|
|
2505
|
+
* gap-match gives the same padding through --qti-drag-padding.
|
|
2506
|
+
*/
|
|
2507
|
+
|
|
2508
|
+
/*
|
|
2509
|
+
* The drop the chip is over, during a drag: the target it lands on when you let go. Every target
|
|
2510
|
+
* that can take a chip already shows the faint `enabled` wash; this one adds the highlight fill and
|
|
2511
|
+
* a ring in the active border colour, OUTSIDE its edge: the chip in flight is the size of the slot
|
|
2512
|
+
* and covers it, so a ring inside would be hidden under the very chip it is for. An outline, so it
|
|
2513
|
+
* costs no layout, and it replaces the dashed outline of a gap or a hotspot while it shows. The drag
|
|
2514
|
+
* code sets the `hover` flag on the one target under the pointer (drag-drop-core.mixin.ts,
|
|
2515
|
+
* handleDragMove).
|
|
2516
|
+
*/
|
|
2517
|
+
|
|
2248
2518
|
/*
|
|
2249
2519
|
* The radio and the checkbox: the other two things this theme draws as boxes, and so the other two
|
|
2250
2520
|
* paint roles. A control is a bordered box on the theme's surface exactly like a chip is, and now it
|
|
@@ -2290,7 +2560,26 @@
|
|
|
2290
2560
|
* A glyph, not a box — the same kind of thing as `grip` and `answer-check`, so it gets a colour slot
|
|
2291
2561
|
* rather than a whole paint role. It is drawn ON the checked control's accent fill (see
|
|
2292
2562
|
* `control-selected`), so the two belong together: override --checkbox-background-color and you will
|
|
2293
|
-
* usually want --checkbox-mark-color with it.
|
|
2563
|
+
* usually want --checkbox-mark-color with it. --qti-primary-fg is the resting value, not a fixed one.
|
|
2564
|
+
*/
|
|
2565
|
+
|
|
2566
|
+
/*
|
|
2567
|
+
* THE focus ring: one outline, on `:focus-visible`, for everything a candidate can focus.
|
|
2568
|
+
*
|
|
2569
|
+
* An outline, not a box-shadow: it costs no layout, and it joins none of the fights over box-shadow
|
|
2570
|
+
* (a chip's resting lift, its in-flight elevation, the placeholder's inset). A focused chip keeps
|
|
2571
|
+
* its lift and gets its ring.
|
|
2572
|
+
*
|
|
2573
|
+
* WHEN: on `:focus`, for everything a candidate can focus (choices, hottext, hotspots, an inline
|
|
2574
|
+
* choice's trigger, a slider, a tabular match cell, chips and drops), so what you just picked with
|
|
2575
|
+
* the mouse shows its ring as it does from the keyboard, and so does the drop a keyboard drag moves
|
|
2576
|
+
* to. A lifted chip's placeholder does not ring (`:not(:state(placeholder))`): the chip is in your
|
|
2577
|
+
* hand, not in the bank. Nor does a chip while the button is down (`:not(:active)`): a press may
|
|
2578
|
+
* be the start of a drag, so the ring waits for the release. A text field matches `:focus-visible`
|
|
2579
|
+
* on a click anyway.
|
|
2580
|
+
*
|
|
2581
|
+
* `foc-inset` draws the same ring just inside the box, for a row in a list that clips (the inline
|
|
2582
|
+
* choice menu scrolls, so a ring outside a row would be cut off at the menu's edge).
|
|
2294
2583
|
*/
|
|
2295
2584
|
|
|
2296
2585
|
/*
|
|
@@ -2299,12 +2588,11 @@
|
|
|
2299
2588
|
*
|
|
2300
2589
|
* `readonly` and `dis` were a single `cursor` declaration each — `pointer` and `not-allowed`. A mixin
|
|
2301
2590
|
* that expands to one property is a name you have to look up to read the rule, and thirteen call
|
|
2302
|
-
* sites had to.
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2305
|
-
*
|
|
2306
|
-
*
|
|
2307
|
-
* one-line mixin.
|
|
2591
|
+
* sites had to. The policy they carried has since split. **Readonly is cursor ONLY**: an answered item
|
|
2592
|
+
* in review keeps its full look, so its answers stay readable. **Disabled paints**: one muted grey
|
|
2593
|
+
* for text, edges, controls and the selected mark (interactions/qti-disabled.css, through
|
|
2594
|
+
* --qti-color-disabled), so a candidate can see that nothing there will respond. Neither moves a
|
|
2595
|
+
* box: only colours change, so the page does not reflow when an item locks.
|
|
2308
2596
|
*
|
|
2309
2597
|
* `act` set `border-color` + `background-color` directly, which is what the paint contract exists to
|
|
2310
2598
|
* stop: a state repaints by SWITCHING a variable, never by re-declaring the property. Its three call
|
|
@@ -2315,12 +2603,9 @@
|
|
|
2315
2603
|
* `act-bor` was deleted outright: zero call sites anywhere in the repo.
|
|
2316
2604
|
*/
|
|
2317
2605
|
|
|
2318
|
-
/* `foc` stays a mixin, deliberately, and is the one state still painting a property directly
|
|
2319
|
-
*
|
|
2320
|
-
*
|
|
2321
|
-
* then fight the resting lift and the in-flight elevation over one slot, last-declared winning,
|
|
2322
|
-
* which is the four-rule contention already documented in qti-variables.css. The intended fix
|
|
2323
|
-
* recorded there is a single `outline` on `:focus-visible`, and that is its own VRT-checked step. */
|
|
2606
|
+
/* `foc` stays a mixin, deliberately, and is the one state still painting a property directly: an
|
|
2607
|
+
* `outline`, which the paint contract does not bind. Nothing else in the theme draws an outline on
|
|
2608
|
+
* these elements, so there is nothing to switch and no slot is needed. */
|
|
2324
2609
|
|
|
2325
2610
|
/* A choice — the clickable box a candidate picks. Nothing but the resting paint box; its padding is
|
|
2326
2611
|
the interaction's (qti-choice-interaction.css), because a choice's box differs per interaction and
|
|
@@ -2358,6 +2643,8 @@
|
|
|
2358
2643
|
* `message` the validation box. Its warning colouring is the interaction's, not the role's.
|
|
2359
2644
|
*/
|
|
2360
2645
|
|
|
2646
|
+
/* The menu and the message hold content, so they take the box radius. */
|
|
2647
|
+
|
|
2361
2648
|
/*
|
|
2362
2649
|
* A drag in flight. The other `drag` modifier — applied with `drag`, never instead of it.
|
|
2363
2650
|
*
|
|
@@ -2366,26 +2653,53 @@
|
|
|
2366
2653
|
*/
|
|
2367
2654
|
|
|
2368
2655
|
/*
|
|
2369
|
-
* A
|
|
2656
|
+
* A press: the fill takes a little more of the content colour while the pointer is down.
|
|
2657
|
+
*
|
|
2658
|
+
* Not used by choices or chips. A choice selects on press (ActiveElementMixin, `activateOn:
|
|
2659
|
+
* 'press'`), so its selection is the feedback; a chip starts a drag, which lifts and tilts it. A
|
|
2660
|
+
* grey wash on top of either only muddied the look. Kept for a control that acts on release. Paint only, so nothing moves, and not guarded
|
|
2661
|
+
* by a hover query: a press is real on touch too, and it ends when the finger lifts.
|
|
2662
|
+
*
|
|
2663
|
+
* $role is the element's paint role (`button`, `drag`); the fill it mixes from is that role's own,
|
|
2664
|
+
* so a selected choice or a branded chip darkens from its own colour. A direct `background-color`,
|
|
2665
|
+
* for the reason `drag-hover` below gives.
|
|
2666
|
+
*
|
|
2667
|
+
* On a chip, call it as `&:active:not(:state(placeholder), :state(dragging))`. `:active` holds for
|
|
2668
|
+
* as long as the button is down, which is the whole drag, and a direct property outranks the slot
|
|
2669
|
+
* the placeholder switches: unguarded, the hole a lifted chip leaves would stay darkened.
|
|
2670
|
+
*/
|
|
2671
|
+
|
|
2672
|
+
/*
|
|
2673
|
+
* A drag's edge takes the primary colour under the pointer. The one hover affordance in the theme.
|
|
2370
2674
|
*
|
|
2371
|
-
* Guarded by `@media (hover: hover)` because touch does not lack hover — it
|
|
2372
|
-
* emulated state sticks after a tap. Without the guard a tapped drag stays
|
|
2373
|
-
* candidate taps somewhere else, which is worse than no hover at all.
|
|
2675
|
+
* Guarded by `@media (hover: hover) and (pointer: fine)` because touch does not lack hover — it
|
|
2676
|
+
* emulates it, and the emulated state sticks after a tap. Without the guard a tapped drag stays
|
|
2677
|
+
* highlighted until the candidate taps somewhere else, which is worse than no hover at all.
|
|
2374
2678
|
*
|
|
2375
|
-
* So this may only ever decorate. Everything it says is also said by
|
|
2679
|
+
* So this may only ever decorate. Everything it says is also said by the focus ring for a keyboard
|
|
2376
2680
|
* and by the resting state for a finger; nothing is communicated by hover alone.
|
|
2377
2681
|
*
|
|
2378
|
-
*
|
|
2379
|
-
*
|
|
2380
|
-
*
|
|
2381
|
-
*
|
|
2382
|
-
*
|
|
2682
|
+
* The edge, not the fill: a fill darkened by the text colour turned every white chip grey. The
|
|
2683
|
+
* border is reserved at rest, so this is paint only and never reflows the bank. It switches the
|
|
2684
|
+
* `--drag-border-color` slot rather than setting `border-color`, so the layers above still win: a
|
|
2685
|
+
* placeholder (states) keeps no edge, and a verdict (corrections) keeps its colour. A brand whose
|
|
2686
|
+
* chip edge already is the primary (Kennisnet's filled chips) sees no change on hover.
|
|
2383
2687
|
*
|
|
2384
2688
|
* It replaces `hov`, an empty mixin invoked 21 times, applied to drags, drop targets, textareas,
|
|
2385
2689
|
* hotspots and choices alike where no single rule suited all of them. This one is called from drags
|
|
2386
2690
|
* only.
|
|
2387
2691
|
*/
|
|
2692
|
+
|
|
2693
|
+
/*
|
|
2694
|
+
* The test controls' look (next, previous, the item links: packages/qti-test/src/components/
|
|
2695
|
+
* styles.ts), for the two interactions that are a button: end attempt, and the upload's file
|
|
2696
|
+
* button. The same `--test-button-*` slots with the same defaults, so a host that repaints its test
|
|
2697
|
+
* buttons repaints these too, and the page shows one kind of button. The neutral look; the filled
|
|
2698
|
+
* one is for Next alone.
|
|
2699
|
+
*/
|
|
2700
|
+
|
|
2388
2701
|
/* Per-interaction sheets; each import carries its layer where the file has just one. */
|
|
2702
|
+
|
|
2389
2703
|
@layer qti-components.interactions.base {
|
|
2390
2704
|
qti-choice-interaction {
|
|
2391
2705
|
/* A choice hugs its text here, unlike order-interaction, which uses the same element as a chip.
|
|
@@ -2400,6 +2714,23 @@
|
|
|
2400
2714
|
width: fit-content;
|
|
2401
2715
|
cursor: pointer;
|
|
2402
2716
|
}
|
|
2717
|
+
|
|
2718
|
+
/* Nothing is drawn around a choice at rest, only the room reserved for what appears when it is
|
|
2719
|
+
selected, so the control sits that far in from the prose around it. Pull a stacked choice out by
|
|
2720
|
+
the room it reserves (its padding and its border): the control and the text then line up with the
|
|
2721
|
+
paragraphs, and the selected paint reaches into the gutter. Not in a row or a grid, where the
|
|
2722
|
+
neighbours would overlap. Set --qti-choice-outdent to 0 for a choice that should stay where its
|
|
2723
|
+
padding puts it, or inside a box that clips. */
|
|
2724
|
+
qti-choice-interaction:not(.qti-input-control-hidden,.qti-orientation-horizontal,[class*='qti-choices-stacking-']) qti-simple-choice {
|
|
2725
|
+
margin-inline-start: calc(-1 * var(--qti-choice-outdent));
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
qti-choice-interaction.qti-input-control-hidden {
|
|
2729
|
+
/* Choices drawn as boxes: their borders are visible, so they need air between them. A list of
|
|
2730
|
+
plain controls does not; its padding spaces it. */
|
|
2731
|
+
--qti-choice-gap: var(--qti-spacing);
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2403
2734
|
qti-choice-interaction.qti-input-control-hidden qti-simple-choice {
|
|
2404
2735
|
background-color: var(--button-background-color, var(--qti-component-background-color));
|
|
2405
2736
|
background-image: var(--button-background-image, var(--qti-component-background-image));
|
|
@@ -2411,10 +2742,17 @@
|
|
|
2411
2742
|
color: var(--button-color, var(--qti-component-color));
|
|
2412
2743
|
opacity: var(--button-opacity, var(--qti-component-opacity));
|
|
2413
2744
|
filter: var(--button-filter, var(--qti-component-filter));
|
|
2745
|
+
/* A box, so a compact one: the chip's padding and the field line height, instead of the
|
|
2746
|
+
roomy --qti-padding-box a plain choice pays for its selected paint. */
|
|
2747
|
+
padding: var(--qti-choice-box-padding);
|
|
2748
|
+
line-height: var(--qti-field-line-height);
|
|
2414
2749
|
--qti-control-display: none;
|
|
2750
|
+
/* On :focus, not :focus-visible: a choice is something you pick, so the ring shows which one
|
|
2751
|
+
you just picked with the mouse too (see `@mixin foc`). */
|
|
2415
2752
|
}
|
|
2416
2753
|
:is(qti-choice-interaction.qti-input-control-hidden qti-simple-choice):focus {
|
|
2417
|
-
|
|
2754
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
2755
|
+
outline-offset: var(--qti-focus-offset);
|
|
2418
2756
|
}
|
|
2419
2757
|
qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice {
|
|
2420
2758
|
background-color: var(--button-background-color, var(--qti-component-background-color));
|
|
@@ -2428,18 +2766,31 @@
|
|
|
2428
2766
|
opacity: var(--button-opacity, var(--qti-component-opacity));
|
|
2429
2767
|
filter: var(--button-filter, var(--qti-component-filter));
|
|
2430
2768
|
--button-border-color: transparent;
|
|
2769
|
+
/* No fill either: at rest such a choice is a line of text with a control before it, so it shows
|
|
2770
|
+
the page behind it, not the theme's surface. A state or a correction still fills it through the
|
|
2771
|
+
same slot. */
|
|
2772
|
+
--button-background-color: transparent;
|
|
2431
2773
|
gap: 0.5rem;
|
|
2432
|
-
outline: none;
|
|
2433
2774
|
cursor: pointer;
|
|
2434
|
-
}
|
|
2435
2775
|
|
|
2776
|
+
/* With a radio or checkbox shown, the ring goes round the control, as on a native one; the
|
|
2777
|
+
choice itself is drawn as nothing at rest, so a ring round it would outline an invisible
|
|
2778
|
+
box. Choices drawn as boxes (.qti-input-control-hidden, above) ring the whole box. The host
|
|
2779
|
+
holds focus, so it is the host's :focus that picks the part; on :focus, so a choice picked
|
|
2780
|
+
with the mouse shows its ring too. */
|
|
2781
|
+
}
|
|
2436
2782
|
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice):focus {
|
|
2437
|
-
|
|
2783
|
+
outline: var(--qti-focus-border-width) solid transparent;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice):focus::part(control) {
|
|
2787
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
2788
|
+
outline-offset: var(--qti-focus-offset);
|
|
2438
2789
|
}
|
|
2439
2790
|
|
|
2440
2791
|
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice)::part(control-mark) {
|
|
2441
|
-
width: calc(var(--qti-control-size) * 0.625);
|
|
2442
|
-
height: calc(var(--qti-control-size) * 0.625);
|
|
2792
|
+
width: round(calc(var(--qti-control-size) * 0.625), 2px);
|
|
2793
|
+
height: round(calc(var(--qti-control-size) * 0.625), 2px);
|
|
2443
2794
|
}
|
|
2444
2795
|
}
|
|
2445
2796
|
|
|
@@ -2495,9 +2846,9 @@
|
|
|
2495
2846
|
|
|
2496
2847
|
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice):is(:state(radio), [data-state~='radio']):is(:state(checked), [data-state~='checked'])::part(control-mark) {
|
|
2497
2848
|
/* 0.5 reproduces today's 8px at the default 1rem — see mark-size for why this is a fraction. */
|
|
2498
|
-
width: calc(var(--qti-control-size) * 0.5);
|
|
2499
|
-
height: calc(var(--qti-control-size) * 0.5);
|
|
2500
|
-
background-color: var(--radio-mark-color,
|
|
2849
|
+
width: round(calc(var(--qti-control-size) * 0.5), 2px);
|
|
2850
|
+
height: round(calc(var(--qti-control-size) * 0.5), 2px);
|
|
2851
|
+
background-color: var(--radio-mark-color, var(--qti-primary-fg));
|
|
2501
2852
|
border-radius: 100%;
|
|
2502
2853
|
}
|
|
2503
2854
|
|
|
@@ -2512,12 +2863,13 @@
|
|
|
2512
2863
|
color: var(--checkbox-color, var(--qti-component-color));
|
|
2513
2864
|
opacity: var(--checkbox-opacity, var(--qti-component-opacity));
|
|
2514
2865
|
filter: var(--checkbox-filter, var(--qti-component-filter));
|
|
2866
|
+
border-radius: var(--checkbox-border-radius, var(--qti-radius-selector));
|
|
2515
2867
|
width: var(--qti-control-size);
|
|
2516
2868
|
height: var(--qti-control-size);
|
|
2517
2869
|
}
|
|
2518
2870
|
|
|
2519
2871
|
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice):is(:state(checkbox), [data-state~='checkbox']):is(:state(checked), [data-state~='checked'])::part(control-mark) {
|
|
2520
|
-
background-color: var(--checkbox-mark-color,
|
|
2872
|
+
background-color: var(--checkbox-mark-color, var(--qti-primary-fg));
|
|
2521
2873
|
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2522
2874
|
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2523
2875
|
}
|
|
@@ -2558,6 +2910,7 @@
|
|
|
2558
2910
|
--button-color: var(--qti-correct);
|
|
2559
2911
|
--button-border-color: var(--qti-correct);
|
|
2560
2912
|
--button-box-shadow: none;
|
|
2913
|
+
--qti-grip-color: var(--qti-correct);
|
|
2561
2914
|
}
|
|
2562
2915
|
|
|
2563
2916
|
:is(qti-choice-interaction.qti-input-control-hidden qti-simple-choice):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
@@ -2565,6 +2918,7 @@
|
|
|
2565
2918
|
--button-color: var(--qti-incorrect);
|
|
2566
2919
|
--button-border-color: var(--qti-incorrect);
|
|
2567
2920
|
--button-box-shadow: none;
|
|
2921
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
2568
2922
|
}
|
|
2569
2923
|
:is(qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
2570
2924
|
background-color: transparent;
|
|
@@ -2636,11 +2990,88 @@
|
|
|
2636
2990
|
qti-graphic-gap-match-interaction qti-gap-img,qti-graphic-gap-match-interaction qti-gap-text {
|
|
2637
2991
|
--qti-drag-justify-content: center;
|
|
2638
2992
|
cursor: grab;
|
|
2993
|
+
/* The bank chip's own ring; the rule below rings only the placed one. */
|
|
2639
2994
|
}
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2995
|
+
:is(qti-graphic-gap-match-interaction qti-gap-img,qti-graphic-gap-match-interaction qti-gap-text):focus:not(:is(:state(placeholder), [data-state~='placeholder']),:active) {
|
|
2996
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
2997
|
+
outline-offset: var(--qti-focus-offset);
|
|
2643
2998
|
}
|
|
2999
|
+
/* The placed chip, in the hotspot's shadow. Plain too, to match the bank. Focus ring only.
|
|
3000
|
+
Written in one selector: nested under `&::part(drag)` it compiled to `:is(…::part(drag))`,
|
|
3001
|
+
and a pseudo-element cannot sit inside `:is()`, so the ring never matched. */
|
|
3002
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot::part(drag):focus:not(:active) {
|
|
3003
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3004
|
+
outline-offset: var(--qti-focus-offset);
|
|
3005
|
+
}
|
|
3006
|
+
qti-graphic-gap-match-interaction {
|
|
3007
|
+
/*
|
|
3008
|
+
* A WORD chip is a label, so it gets the chip box: the drag paint and the inline-field box, the
|
|
3009
|
+
* same as a gap-match chip, in the bank and on the image. An IMAGE tile stays plain, as above.
|
|
3010
|
+
*/
|
|
3011
|
+
--qti-drag-padding: var(--qti-inline-field-padding);
|
|
3012
|
+
}
|
|
3013
|
+
qti-graphic-gap-match-interaction qti-gap-text {
|
|
3014
|
+
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
3015
|
+
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
3016
|
+
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3017
|
+
box-sizing: border-box;
|
|
3018
|
+
padding: var(--qti-drag-padding);
|
|
3019
|
+
line-height: var(--qti-field-line-height);
|
|
3020
|
+
cursor: grab;
|
|
3021
|
+
/*
|
|
3022
|
+
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
3023
|
+
*
|
|
3024
|
+
* That one shared name is what makes a drag and its drop the same size without any arithmetic
|
|
3025
|
+
* relating them: the interaction measures the widest chip, publishes it once, and both the chip
|
|
3026
|
+
* and the slot read it. See DROP-SIZING.md.
|
|
3027
|
+
*
|
|
3028
|
+
* It applies in the bank as well as in the drop, which is the point: the chip already has the
|
|
3029
|
+
* width before it is dropped, so nothing changes size at the moment of landing. That keeps "a chip
|
|
3030
|
+
* is the same chip wherever it lives" true (drag-drop.invariance.spec.ts) and keeps the return
|
|
3031
|
+
* animation from ending in a snap. A `width: 100%` on the placed chip gives the same still image
|
|
3032
|
+
* and breaks both — it is what order used to do, and why order was the one entry in
|
|
3033
|
+
* CHIP_BOX_KNOWN_BAD.
|
|
3034
|
+
*
|
|
3035
|
+
* min-width, not width, so a chip whose own text is wider than the widest measured chip still
|
|
3036
|
+
* fits. Defaults to 0 where nothing is measured (match, whose targets are cards, not slots), so
|
|
3037
|
+
* those chips keep their natural width with no rule needed to say so.
|
|
3038
|
+
*
|
|
3039
|
+
* --qti-drag-min-width, not --qti-dropzone-min-width: the mixin writes the same measured value to
|
|
3040
|
+
* both, so a chip and its slot still match, but the two need OPPOSITE defaults when nothing is
|
|
3041
|
+
* measured — a chip must stay at its natural width, while a drops-grid track must not collapse.
|
|
3042
|
+
* See the note on both names in qti-variables.css.
|
|
3043
|
+
*/
|
|
3044
|
+
min-width: var(--qti-drag-min-width, 0);
|
|
3045
|
+
/* Paint via the contract, nothing more — the --qti-component-* tokens already make a neutral
|
|
3046
|
+
bordered box (white surface, theme border, no shadow). The chip sets NO --drag-* of its own,
|
|
3047
|
+
and that is load-bearing: if it did (e.g. `--drag-background-color: white`), that declaration
|
|
3048
|
+
would ride the interaction's HIGH-specificity chip selector
|
|
3049
|
+
(`qti-gap-match-interaction qti-gap::part(drag)`) and out-specify a brand overlay's bare
|
|
3050
|
+
`qti-gap::part(drag)`, so the brand could never win. With nothing set here, the overlay's
|
|
3051
|
+
--drag-* is the only declaration and wins with no specificity/layer contest. */
|
|
3052
|
+
background-color: var(--drag-background-color, var(--qti-component-background-color));
|
|
3053
|
+
background-image: var(--drag-background-image, var(--qti-component-background-image));
|
|
3054
|
+
border-width: var(--drag-border-width, var(--qti-component-border-width));
|
|
3055
|
+
border-style: var(--drag-border-style, var(--qti-component-border-style));
|
|
3056
|
+
border-color: var(--drag-border-color, var(--qti-component-border-color));
|
|
3057
|
+
border-radius: var(--drag-border-radius, var(--qti-component-border-radius));
|
|
3058
|
+
box-shadow: var(--drag-box-shadow, var(--qti-component-box-shadow));
|
|
3059
|
+
color: var(--drag-color, var(--qti-component-color));
|
|
3060
|
+
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3061
|
+
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3062
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3063
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3064
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3065
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3066
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3067
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3068
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3069
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3070
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3071
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3072
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3073
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3074
|
+
}
|
|
2644
3075
|
/*
|
|
2645
3076
|
* The hotspot centres its chip in qti-associable-hotspot.styles.ts.
|
|
2646
3077
|
*
|
|
@@ -2654,6 +3085,13 @@
|
|
|
2654
3085
|
* Adding a rule would be a redundant restatement of this line. Left as a note rather than code
|
|
2655
3086
|
* because the absence is the kind of thing that reads as an oversight.
|
|
2656
3087
|
*/
|
|
3088
|
+
/* Where a word or tile can go, shown at rest: a dashed edge on an empty hotspot, drawn as an
|
|
3089
|
+
outline so the hotspot's box does not change. Not under qti-unselected-hidden, where the author
|
|
3090
|
+
asks for the hotspots to stay hidden until used (QTI 3 Appendix B.1). */
|
|
3091
|
+
qti-graphic-gap-match-interaction:not(.qti-unselected-hidden) qti-associable-hotspot:not(:is(:state(filled), [data-state~='filled'])) {
|
|
3092
|
+
outline: var(--qti-border-width) dashed var(--qti-border-color);
|
|
3093
|
+
outline-offset: var(--qti-drop-outline-offset);
|
|
3094
|
+
}
|
|
2657
3095
|
qti-graphic-gap-match-interaction qti-associable-hotspot {
|
|
2658
3096
|
border: 2px solid transparent;
|
|
2659
3097
|
/* No .qti-selections-* branches in here. They used to sit inside both of these blocks as
|
|
@@ -2699,7 +3137,7 @@
|
|
|
2699
3137
|
chip `flex: 0 0 auto`, which is the invariance rule this was quietly fighting. */
|
|
2700
3138
|
:is(qti-graphic-gap-match-interaction qti-associable-hotspot):not(:empty) > * {
|
|
2701
3139
|
transform: rotate(0);
|
|
2702
|
-
box-shadow: 0 0 0
|
|
3140
|
+
box-shadow: 0 0 0 var(--qti-border-width) var(--qti-color-base-300);
|
|
2703
3141
|
}
|
|
2704
3142
|
/* `:not(:empty)` tested light-DOM children. The hotspot renders its chips into its own shadow
|
|
2705
3143
|
root now, so it is always "empty" to a selector — `:state(filled)` is the occupancy hook. */
|
|
@@ -2729,15 +3167,84 @@
|
|
|
2729
3167
|
}
|
|
2730
3168
|
}
|
|
2731
3169
|
|
|
3170
|
+
/* The placed word, in the hotspot's shadow. Flat: a pseudo-element in a nested list compiles to a
|
|
3171
|
+
dead `:is()`. */
|
|
3172
|
+
@layer qti-components.interactions.base {
|
|
3173
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot::part(drag-text) {
|
|
3174
|
+
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
3175
|
+
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
3176
|
+
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3177
|
+
box-sizing: border-box;
|
|
3178
|
+
padding: var(--qti-drag-padding);
|
|
3179
|
+
line-height: var(--qti-field-line-height);
|
|
3180
|
+
cursor: grab;
|
|
3181
|
+
/*
|
|
3182
|
+
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
3183
|
+
*
|
|
3184
|
+
* That one shared name is what makes a drag and its drop the same size without any arithmetic
|
|
3185
|
+
* relating them: the interaction measures the widest chip, publishes it once, and both the chip
|
|
3186
|
+
* and the slot read it. See DROP-SIZING.md.
|
|
3187
|
+
*
|
|
3188
|
+
* It applies in the bank as well as in the drop, which is the point: the chip already has the
|
|
3189
|
+
* width before it is dropped, so nothing changes size at the moment of landing. That keeps "a chip
|
|
3190
|
+
* is the same chip wherever it lives" true (drag-drop.invariance.spec.ts) and keeps the return
|
|
3191
|
+
* animation from ending in a snap. A `width: 100%` on the placed chip gives the same still image
|
|
3192
|
+
* and breaks both — it is what order used to do, and why order was the one entry in
|
|
3193
|
+
* CHIP_BOX_KNOWN_BAD.
|
|
3194
|
+
*
|
|
3195
|
+
* min-width, not width, so a chip whose own text is wider than the widest measured chip still
|
|
3196
|
+
* fits. Defaults to 0 where nothing is measured (match, whose targets are cards, not slots), so
|
|
3197
|
+
* those chips keep their natural width with no rule needed to say so.
|
|
3198
|
+
*
|
|
3199
|
+
* --qti-drag-min-width, not --qti-dropzone-min-width: the mixin writes the same measured value to
|
|
3200
|
+
* both, so a chip and its slot still match, but the two need OPPOSITE defaults when nothing is
|
|
3201
|
+
* measured — a chip must stay at its natural width, while a drops-grid track must not collapse.
|
|
3202
|
+
* See the note on both names in qti-variables.css.
|
|
3203
|
+
*/
|
|
3204
|
+
min-width: var(--qti-drag-min-width, 0);
|
|
3205
|
+
/* Paint via the contract, nothing more — the --qti-component-* tokens already make a neutral
|
|
3206
|
+
bordered box (white surface, theme border, no shadow). The chip sets NO --drag-* of its own,
|
|
3207
|
+
and that is load-bearing: if it did (e.g. `--drag-background-color: white`), that declaration
|
|
3208
|
+
would ride the interaction's HIGH-specificity chip selector
|
|
3209
|
+
(`qti-gap-match-interaction qti-gap::part(drag)`) and out-specify a brand overlay's bare
|
|
3210
|
+
`qti-gap::part(drag)`, so the brand could never win. With nothing set here, the overlay's
|
|
3211
|
+
--drag-* is the only declaration and wins with no specificity/layer contest. */
|
|
3212
|
+
background-color: var(--drag-background-color, var(--qti-component-background-color));
|
|
3213
|
+
background-image: var(--drag-background-image, var(--qti-component-background-image));
|
|
3214
|
+
border-width: var(--drag-border-width, var(--qti-component-border-width));
|
|
3215
|
+
border-style: var(--drag-border-style, var(--qti-component-border-style));
|
|
3216
|
+
border-color: var(--drag-border-color, var(--qti-component-border-color));
|
|
3217
|
+
border-radius: var(--drag-border-radius, var(--qti-component-border-radius));
|
|
3218
|
+
box-shadow: var(--drag-box-shadow, var(--qti-component-box-shadow));
|
|
3219
|
+
color: var(--drag-color, var(--qti-component-color));
|
|
3220
|
+
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3221
|
+
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3222
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3223
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3224
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3225
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3226
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3227
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3228
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3229
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3230
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3231
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3232
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3233
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
|
|
2732
3237
|
@layer qti-components.interactions.states {
|
|
2733
3238
|
qti-graphic-gap-match-interaction qti-gap-img:is(:state(placeholder), [data-state~='placeholder']),
|
|
2734
3239
|
qti-graphic-gap-match-interaction qti-gap-text:is(:state(placeholder), [data-state~='placeholder']) {
|
|
2735
3240
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
2736
|
-
shadow
|
|
2737
|
-
|
|
2738
|
-
with no specificity contest. The one thing
|
|
2739
|
-
|
|
3241
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
3242
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
3243
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
3244
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
3245
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
2740
3246
|
--drag-color: transparent;
|
|
3247
|
+
--qti-grip-color: transparent;
|
|
2741
3248
|
--drag-opacity: 1;
|
|
2742
3249
|
pointer-events: none;
|
|
2743
3250
|
}
|
|
@@ -2745,15 +3252,17 @@
|
|
|
2745
3252
|
qti-graphic-gap-match-interaction qti-gap-img:is(:state(dragging), [data-state~='dragging']),
|
|
2746
3253
|
qti-graphic-gap-match-interaction qti-gap-text:is(:state(dragging), [data-state~='dragging']) {
|
|
2747
3254
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
2748
|
-
shadow
|
|
2749
|
-
|
|
2750
|
-
with no specificity contest. The one thing
|
|
2751
|
-
|
|
3255
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
3256
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
3257
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
3258
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
3259
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
2752
3260
|
--drag-color: transparent;
|
|
3261
|
+
--qti-grip-color: transparent;
|
|
2753
3262
|
--drag-opacity: 1;
|
|
2754
3263
|
border-color: var(--qti-drop-highlight-border-color);
|
|
2755
3264
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
2756
|
-
color-mix(in
|
|
3265
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
2757
3266
|
pointer-events: none;
|
|
2758
3267
|
}
|
|
2759
3268
|
|
|
@@ -2761,7 +3270,7 @@
|
|
|
2761
3270
|
qti-graphic-gap-match-interaction qti-gap-text:is(:state(return-anchor), [data-state~='return-anchor']) {
|
|
2762
3271
|
border-color: var(--qti-drop-highlight-border-color);
|
|
2763
3272
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
2764
|
-
color-mix(in
|
|
3273
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
2765
3274
|
}
|
|
2766
3275
|
|
|
2767
3276
|
qti-graphic-gap-match-interaction qti-gap-img:is(:state(placeholder), [data-state~='placeholder']) > *,
|
|
@@ -2771,14 +3280,17 @@
|
|
|
2771
3280
|
visibility: hidden;
|
|
2772
3281
|
}
|
|
2773
3282
|
|
|
2774
|
-
qti-graphic-gap-match-interaction qti-associable-hotspot:is(:state(
|
|
2775
|
-
qti-graphic-gap-match-interaction qti-associable-hotspot:is(:state(active), [data-state~='active']) {
|
|
2776
|
-
background-color: var(--qti-drop-highlight-bg);
|
|
2777
|
-
}
|
|
2778
|
-
|
|
3283
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot:is(:state(active), [data-state~='active']),
|
|
2779
3284
|
qti-graphic-gap-match-interaction qti-associable-hotspot:is(:state(enabled), [data-state~='enabled']) {
|
|
2780
3285
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
2781
3286
|
}
|
|
3287
|
+
|
|
3288
|
+
/* After `enabled`, which every target carries during a drag: the one under the chip. */
|
|
3289
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot:is(:state(hover), [data-state~='hover']) {
|
|
3290
|
+
background-color: var(--qti-drop-highlight-bg);
|
|
3291
|
+
outline: var(--qti-drop-highlight-border-width) solid var(--qti-drop-highlight-border-color);
|
|
3292
|
+
outline-offset: var(--qti-focus-offset);
|
|
3293
|
+
}
|
|
2782
3294
|
}
|
|
2783
3295
|
|
|
2784
3296
|
@layer qti-components.interactions.corrections {
|
|
@@ -2795,16 +3307,27 @@
|
|
|
2795
3307
|
* Moved here from qti-corrections.css, whose unscoped `:state(drag)` rule covered these chips
|
|
2796
3308
|
* along with everyone else's.
|
|
2797
3309
|
*/
|
|
2798
|
-
qti-graphic-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct'])
|
|
2799
|
-
|
|
3310
|
+
qti-graphic-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
3311
|
+
background-color: var(--qti-correct-light);
|
|
3312
|
+
color: var(--qti-correct);
|
|
3313
|
+
border-color: var(--qti-correct);
|
|
3314
|
+
box-shadow: none;
|
|
3315
|
+
}
|
|
3316
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot::part(drag):state(candidate-correct) {
|
|
2800
3317
|
background-color: var(--qti-correct-light);
|
|
2801
3318
|
color: var(--qti-correct);
|
|
2802
3319
|
border-color: var(--qti-correct);
|
|
2803
3320
|
box-shadow: none;
|
|
2804
3321
|
}
|
|
2805
3322
|
|
|
2806
|
-
qti-graphic-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect'])
|
|
2807
|
-
|
|
3323
|
+
qti-graphic-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
3324
|
+
background-color: var(--qti-incorrect-light);
|
|
3325
|
+
color: var(--qti-incorrect);
|
|
3326
|
+
border-color: var(--qti-incorrect);
|
|
3327
|
+
box-shadow: none;
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
qti-graphic-gap-match-interaction qti-associable-hotspot::part(drag):state(candidate-incorrect) {
|
|
2808
3331
|
background-color: var(--qti-incorrect-light);
|
|
2809
3332
|
color: var(--qti-incorrect);
|
|
2810
3333
|
border-color: var(--qti-incorrect);
|
|
@@ -2825,19 +3348,42 @@
|
|
|
2825
3348
|
opacity: var(--text-opacity, var(--qti-component-opacity));
|
|
2826
3349
|
filter: var(--text-filter, var(--qti-component-filter));
|
|
2827
3350
|
cursor: text;
|
|
3351
|
+
|
|
3352
|
+
margin-inline: var(--qti-inline-gap);
|
|
3353
|
+
|
|
3354
|
+
line-height: var(--qti-field-line-height);
|
|
3355
|
+
|
|
3356
|
+
--qti-padding-box: var(--qti-inline-field-padding);
|
|
3357
|
+
|
|
3358
|
+
/* The correction badge sits as far in from the end as the text does from the start. */
|
|
3359
|
+
|
|
3360
|
+
--qti-correction-inset: var(--qti-inline-padding-inline);
|
|
3361
|
+
|
|
3362
|
+
/* The host is the field's box, so the ring goes on the host, around the border a candidate
|
|
3363
|
+
sees, and the input inside it draws none of its own: a browser's default ring there was a
|
|
3364
|
+
second one, inside the first (and orange, in Chrome). Transparent rather than removed, so a
|
|
3365
|
+
forced-colours mode that paints outlines still shows one. */
|
|
2828
3366
|
}
|
|
3367
|
+
qti-text-entry-interaction:focus-within {
|
|
3368
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3369
|
+
outline-offset: var(--qti-focus-offset);
|
|
3370
|
+
}
|
|
2829
3371
|
|
|
2830
3372
|
qti-text-entry-interaction::part(input) {
|
|
2831
3373
|
color: var(--qti-fg);
|
|
2832
3374
|
font-family: inherit;
|
|
2833
3375
|
font-size: 1rem;
|
|
2834
|
-
line-height:
|
|
3376
|
+
line-height: var(--qti-field-line-height);
|
|
2835
3377
|
-webkit-appearance: none;
|
|
2836
3378
|
-moz-appearance: none;
|
|
2837
3379
|
appearance: none;
|
|
2838
3380
|
border: none;
|
|
2839
3381
|
background-color: transparent;
|
|
2840
3382
|
}
|
|
3383
|
+
|
|
3384
|
+
qti-text-entry-interaction::part(input):focus-visible {
|
|
3385
|
+
outline: var(--qti-focus-border-width) solid transparent;
|
|
3386
|
+
}
|
|
2841
3387
|
}
|
|
2842
3388
|
|
|
2843
3389
|
@layer qti-components.interactions.corrections {
|
|
@@ -2846,6 +3392,7 @@
|
|
|
2846
3392
|
--text-color: var(--qti-partially-correct);
|
|
2847
3393
|
--text-border-color: var(--qti-partially-correct);
|
|
2848
3394
|
--text-box-shadow: none;
|
|
3395
|
+
--qti-grip-color: var(--qti-partially-correct);
|
|
2849
3396
|
}
|
|
2850
3397
|
|
|
2851
3398
|
qti-text-entry-interaction:is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
@@ -2853,6 +3400,7 @@
|
|
|
2853
3400
|
--text-color: var(--qti-correct);
|
|
2854
3401
|
--text-border-color: var(--qti-correct);
|
|
2855
3402
|
--text-box-shadow: none;
|
|
3403
|
+
--qti-grip-color: var(--qti-correct);
|
|
2856
3404
|
}
|
|
2857
3405
|
|
|
2858
3406
|
qti-text-entry-interaction:is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
@@ -2860,6 +3408,7 @@
|
|
|
2860
3408
|
--text-color: var(--qti-incorrect);
|
|
2861
3409
|
--text-border-color: var(--qti-incorrect);
|
|
2862
3410
|
--text-box-shadow: none;
|
|
3411
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
2863
3412
|
}
|
|
2864
3413
|
|
|
2865
3414
|
/* The answer key, moved here from the shared qti-corrections.css: it names this interaction, so
|
|
@@ -2900,9 +3449,10 @@
|
|
|
2900
3449
|
color: var(--qti-fg);
|
|
2901
3450
|
font-family: inherit;
|
|
2902
3451
|
font-size: 1rem;
|
|
2903
|
-
line-height:
|
|
3452
|
+
line-height: var(--qti-field-line-height);
|
|
2904
3453
|
/*
|
|
2905
|
-
* The
|
|
3454
|
+
* The gutter at the END of the line is reserved ALWAYS, graded or not (it was on the left, which
|
|
3455
|
+
* indented every answer by the badge's room).
|
|
2906
3456
|
*
|
|
2907
3457
|
* It holds the correction badge, and it is stated here rather than in the corrections layer
|
|
2908
3458
|
* because padding is layout: switching it on `:state(candidate-*)` would re-wrap every line of
|
|
@@ -2918,8 +3468,8 @@
|
|
|
2918
3468
|
* padding and the badge's own offsets cannot drift apart. It was a literal 2.4rem that had to
|
|
2919
3469
|
* be kept in agreement by hand with numbers in a different package.
|
|
2920
3470
|
*/
|
|
2921
|
-
padding: var(--qti-spacing)
|
|
2922
|
-
|
|
3471
|
+
padding-block: var(--qti-spacing);
|
|
3472
|
+
padding-inline: var(--qti-correction-inset) var(--qti-correction-gutter);
|
|
2923
3473
|
|
|
2924
3474
|
background-color: var(--text-background-color, var(--qti-component-background-color));
|
|
2925
3475
|
|
|
@@ -2954,6 +3504,12 @@
|
|
|
2954
3504
|
* that makes the preserved indentation legible. Typography only — the box does not move, so
|
|
2955
3505
|
* the layout-invariance contract holds.
|
|
2956
3506
|
*/
|
|
3507
|
+
/* The textarea is the field's box itself, so the theme's ring replaces the browser's. */
|
|
3508
|
+
qti-extended-text-interaction::part(textarea):focus-visible {
|
|
3509
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3510
|
+
outline-offset: var(--qti-focus-offset);
|
|
3511
|
+
}
|
|
3512
|
+
|
|
2957
3513
|
qti-extended-text-interaction[format='preformatted']::part(textarea) {
|
|
2958
3514
|
font-family: monospace;
|
|
2959
3515
|
-moz-tab-size: 2;
|
|
@@ -2986,6 +3542,7 @@
|
|
|
2986
3542
|
--text-color: var(--qti-correct);
|
|
2987
3543
|
--text-border-color: var(--qti-correct);
|
|
2988
3544
|
--text-box-shadow: none;
|
|
3545
|
+
--qti-grip-color: var(--qti-correct);
|
|
2989
3546
|
}
|
|
2990
3547
|
|
|
2991
3548
|
/* Amber throughout — text, edge and wash — exactly like text-entry's partial rule, which is the
|
|
@@ -2999,6 +3556,7 @@
|
|
|
2999
3556
|
--text-color: var(--qti-partially-correct);
|
|
3000
3557
|
--text-border-color: var(--qti-partially-correct);
|
|
3001
3558
|
--text-box-shadow: none;
|
|
3559
|
+
--qti-grip-color: var(--qti-partially-correct);
|
|
3002
3560
|
}
|
|
3003
3561
|
|
|
3004
3562
|
qti-extended-text-interaction:is(:state(candidate-incorrect), [data-state~='candidate-incorrect'])::part(textarea) {
|
|
@@ -3006,6 +3564,7 @@
|
|
|
3006
3564
|
--text-color: var(--qti-incorrect);
|
|
3007
3565
|
--text-border-color: var(--qti-incorrect);
|
|
3008
3566
|
--text-box-shadow: none;
|
|
3567
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
3009
3568
|
}
|
|
3010
3569
|
}
|
|
3011
3570
|
/* This interaction's chip vocabulary — the bank chip, the placed chip, and the floating clone. One
|
|
@@ -3031,6 +3590,7 @@
|
|
|
3031
3590
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3032
3591
|
box-sizing: border-box;
|
|
3033
3592
|
padding: var(--qti-drag-padding);
|
|
3593
|
+
line-height: var(--qti-field-line-height);
|
|
3034
3594
|
cursor: grab;
|
|
3035
3595
|
/*
|
|
3036
3596
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -3073,6 +3633,18 @@
|
|
|
3073
3633
|
color: var(--drag-color, var(--qti-component-color));
|
|
3074
3634
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3075
3635
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3636
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3637
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3638
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3639
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3640
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3641
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3642
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3643
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3644
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3645
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3646
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3647
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3076
3648
|
}
|
|
3077
3649
|
|
|
3078
3650
|
qti-gap-match-interaction :is(:state(drag), [data-state~='drag'])::part(control)::before,
|
|
@@ -3085,23 +3657,40 @@
|
|
|
3085
3657
|
width: 0.75em;
|
|
3086
3658
|
height: 1em;
|
|
3087
3659
|
margin-right: var(--qti-glyph-gap);
|
|
3088
|
-
|
|
3660
|
+
/* A verdict (`@mixin candidate`) sets --qti-grip-color, so a corrected chip's handle takes the
|
|
3661
|
+
verdict colour even when a brand colours its handles. */
|
|
3662
|
+
background-color: var(--qti-grip-color, var(--cito-color-drag-icon, currentColor));
|
|
3089
3663
|
mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
3090
3664
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
3091
3665
|
}
|
|
3092
3666
|
}
|
|
3093
3667
|
|
|
3094
3668
|
@layer qti-components.interactions.base {
|
|
3669
|
+
qti-gap-match-interaction {
|
|
3670
|
+
/* Its chips go into gaps in a sentence, so they are inline fields too: the inline-field padding
|
|
3671
|
+
instead of a chip's roomier one, and the field line height. A gap is sized by the chip it
|
|
3672
|
+
takes, so it follows. Bank chips get the same box, so a chip does not change size when it
|
|
3673
|
+
lands (drag-drop.invariance.spec.ts). */
|
|
3674
|
+
--qti-drag-padding: var(--qti-inline-field-padding);
|
|
3095
3675
|
/* No qti-selections-light / -dark here. Appendix B.1 of the QTI 3 implementation guide defines
|
|
3096
3676
|
that class pair for qti-hotspot-interaction and qti-graphic-gap-match-interaction only, and no
|
|
3097
3677
|
item in this repo ever set it on a gap-match interaction. What was here overrode the neutral
|
|
3098
3678
|
drag-bank highlight below with --qti-light-* and --qti-dark-* colours that nothing could reach. */
|
|
3679
|
+
}
|
|
3099
3680
|
qti-gap-match-interaction:is(:state(dragzone-active), [data-state~='dragzone-active'])::part(drags) {
|
|
3100
3681
|
background-color: var(--qti-bg-active);
|
|
3101
3682
|
}
|
|
3102
3683
|
qti-gap-match-interaction:is(:state(dragzone-enabled), [data-state~='dragzone-enabled'])::part(drags) {
|
|
3103
3684
|
background-color: var(--qti-bg-active);
|
|
3104
3685
|
}
|
|
3686
|
+
qti-gap-match-interaction qti-gap {
|
|
3687
|
+
margin-inline: var(--qti-inline-gap);
|
|
3688
|
+
line-height: var(--qti-field-line-height);
|
|
3689
|
+
--qti-padding-box: var(--qti-inline-field-padding);
|
|
3690
|
+
/* The correction badge sits as far in from the end as the text does from the start. */
|
|
3691
|
+
--qti-correction-inset: var(--qti-inline-padding-inline);
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3105
3694
|
/* Editor fake-drag projected into a filled <qti-gap>'s shadow. Same `drag`
|
|
3106
3695
|
styling so the editor preview matches runtime when a gap is filled. */
|
|
3107
3696
|
qti-gap-match-interaction qti-gap::part(drag) {
|
|
@@ -3110,6 +3699,7 @@
|
|
|
3110
3699
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3111
3700
|
box-sizing: border-box;
|
|
3112
3701
|
padding: var(--qti-drag-padding);
|
|
3702
|
+
line-height: var(--qti-field-line-height);
|
|
3113
3703
|
cursor: grab;
|
|
3114
3704
|
/*
|
|
3115
3705
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -3152,25 +3742,26 @@
|
|
|
3152
3742
|
color: var(--drag-color, var(--qti-component-color));
|
|
3153
3743
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3154
3744
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3745
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3746
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3747
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3748
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3749
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3750
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3751
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3752
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3753
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3754
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3755
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3756
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3155
3757
|
}
|
|
3156
|
-
@media (hover: hover) {
|
|
3157
|
-
:is(qti-gap-match-interaction qti-gap::part(drag)):hover {
|
|
3158
|
-
background-color: color-mix(
|
|
3159
|
-
in srgb,
|
|
3160
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
3161
|
-
black
|
|
3162
|
-
);
|
|
3163
|
-
}
|
|
3164
|
-
}
|
|
3165
|
-
:is(qti-gap-match-interaction qti-gap::part(drag)):focus {
|
|
3166
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3167
|
-
}
|
|
3168
3758
|
qti-gap-match-interaction qti-gap-text {
|
|
3169
3759
|
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
3170
3760
|
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
3171
3761
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3172
3762
|
box-sizing: border-box;
|
|
3173
3763
|
padding: var(--qti-drag-padding);
|
|
3764
|
+
line-height: var(--qti-field-line-height);
|
|
3174
3765
|
cursor: grab;
|
|
3175
3766
|
/*
|
|
3176
3767
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -3213,23 +3804,33 @@
|
|
|
3213
3804
|
color: var(--drag-color, var(--qti-component-color));
|
|
3214
3805
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3215
3806
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3807
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3808
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3809
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3810
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3811
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3812
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3813
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3814
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3815
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3816
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3817
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3818
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3819
|
+
line-height: var(--qti-field-line-height);
|
|
3216
3820
|
}
|
|
3217
3821
|
[dragging]:is(qti-gap-match-interaction qti-gap-text) {
|
|
3218
3822
|
pointer-events: none;
|
|
3219
3823
|
rotate: -2deg;
|
|
3220
|
-
--drag-box-shadow:
|
|
3824
|
+
--drag-box-shadow: var(--qti-drag-elevation);
|
|
3221
3825
|
}
|
|
3222
|
-
@media (hover: hover) {
|
|
3826
|
+
@media (hover: hover) and (pointer: fine) {
|
|
3223
3827
|
:is(qti-gap-match-interaction qti-gap-text):hover {
|
|
3224
|
-
|
|
3225
|
-
in srgb,
|
|
3226
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
3227
|
-
black
|
|
3228
|
-
);
|
|
3828
|
+
--drag-border-color: var(--qti-border-active);
|
|
3229
3829
|
}
|
|
3230
3830
|
}
|
|
3231
|
-
:is(qti-gap-match-interaction qti-gap-text):focus {
|
|
3232
|
-
|
|
3831
|
+
:is(qti-gap-match-interaction qti-gap-text):focus:not(:is(:state(placeholder), [data-state~='placeholder']),:active) {
|
|
3832
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3833
|
+
outline-offset: var(--qti-focus-offset);
|
|
3233
3834
|
}
|
|
3234
3835
|
qti-gap-match-interaction qti-gap {
|
|
3235
3836
|
background-color: var(--drop-background-color, var(--qti-component-background-color));
|
|
@@ -3244,6 +3845,26 @@
|
|
|
3244
3845
|
filter: var(--drop-filter, var(--qti-component-filter));
|
|
3245
3846
|
border-style: var(--drop-border-style, dashed);
|
|
3246
3847
|
|
|
3848
|
+
/*
|
|
3849
|
+
* The dashed edge as an inset OUTLINE, not a border, so the gap is exactly as tall as the chip
|
|
3850
|
+
* it takes and as every other field in the sentence. A border would add its width to the chip's
|
|
3851
|
+
* height (the gap reserves the chip's border-box inside its own border). The outline reads the
|
|
3852
|
+
* same --drop-* slots as the border did, so the states and corrections that switch them still
|
|
3853
|
+
* repaint it; focus draws its own ring over it.
|
|
3854
|
+
*/
|
|
3855
|
+
--drop-border-width: 0;
|
|
3856
|
+
outline: var(--qti-border-width) var(--drop-border-style, dashed)
|
|
3857
|
+
var(--drop-border-color, var(--qti-component-border-color));
|
|
3858
|
+
outline-offset: var(--qti-drop-outline-offset);
|
|
3859
|
+
|
|
3860
|
+
/* Focused (Tab, or the keyboard drag moving to it), the solid ring replaces the dashed edge:
|
|
3861
|
+
both are the outline, so without this the focus could not be seen. */
|
|
3862
|
+
}
|
|
3863
|
+
:is(qti-gap-match-interaction qti-gap):focus {
|
|
3864
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3865
|
+
outline-offset: var(--qti-focus-offset);
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3247
3868
|
/*
|
|
3248
3869
|
* A filled gap hides its dashed edge, exactly as a filled order slot does
|
|
3249
3870
|
* (qti-order-interaction.css, `::part(filled)`).
|
|
@@ -3259,7 +3880,6 @@
|
|
|
3259
3880
|
* every word on the line the instant a chip landed — the exact reflow qti-gap.styles.ts and
|
|
3260
3881
|
* drag-drop.invariance.spec.ts exist to prevent.
|
|
3261
3882
|
*/
|
|
3262
|
-
}
|
|
3263
3883
|
:is(qti-gap-match-interaction qti-gap):is(:state(filled), [data-state~='filled']):is(:not([match-max]),[match-max='1']) {
|
|
3264
3884
|
--drop-border-color: transparent;
|
|
3265
3885
|
}
|
|
@@ -3308,7 +3928,7 @@
|
|
|
3308
3928
|
transform: rotate(0);
|
|
3309
3929
|
/* Through the drag slot so a correction (which sets --drag-box-shadow) composes over it
|
|
3310
3930
|
instead of this leaking onto a corrected chip. */
|
|
3311
|
-
--drag-box-shadow: 0 0 0
|
|
3931
|
+
--drag-box-shadow: 0 0 0 var(--qti-border-width) var(--qti-color-base-300);
|
|
3312
3932
|
}
|
|
3313
3933
|
|
|
3314
3934
|
/* The source and placed chip share one visual component. */
|
|
@@ -3319,6 +3939,7 @@
|
|
|
3319
3939
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3320
3940
|
box-sizing: border-box;
|
|
3321
3941
|
padding: var(--qti-drag-padding);
|
|
3942
|
+
line-height: var(--qti-field-line-height);
|
|
3322
3943
|
cursor: grab;
|
|
3323
3944
|
/*
|
|
3324
3945
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -3361,6 +3982,18 @@
|
|
|
3361
3982
|
color: var(--drag-color, var(--qti-component-color));
|
|
3362
3983
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3363
3984
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
3985
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
3986
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
3987
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
3988
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
3989
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
3990
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
3991
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
3992
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
3993
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
3994
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
3995
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
3996
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
3364
3997
|
}
|
|
3365
3998
|
}
|
|
3366
3999
|
|
|
@@ -3372,6 +4005,7 @@
|
|
|
3372
4005
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
3373
4006
|
box-sizing: border-box;
|
|
3374
4007
|
padding: var(--qti-drag-padding);
|
|
4008
|
+
line-height: var(--qti-field-line-height);
|
|
3375
4009
|
cursor: grab;
|
|
3376
4010
|
/*
|
|
3377
4011
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -3414,47 +4048,82 @@
|
|
|
3414
4048
|
color: var(--drag-color, var(--qti-component-color));
|
|
3415
4049
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
3416
4050
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
4051
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
4052
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
4053
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
4054
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
4055
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
4056
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
4057
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
4058
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
4059
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
4060
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
4061
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
4062
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
/*
|
|
4066
|
+
* A placed chip's hover and focus ring. Written flat: nested under `&::part(drag)` they
|
|
4067
|
+
* compiled to `:is(…::part(drag)):hover`, and a pseudo-element cannot sit inside `:is()`, so none
|
|
4068
|
+
* of them ever matched. In this layer, after the chip rule, because `@mixin drag` sets
|
|
4069
|
+
* `background-color` and must not out-rank the hover.
|
|
4070
|
+
*/
|
|
4071
|
+
@media (hover: hover) and (pointer: fine) {
|
|
4072
|
+
qti-gap-match-interaction qti-gap::part(drag):hover {
|
|
4073
|
+
--drag-border-color: var(--qti-border-active);
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
4076
|
+
qti-gap-match-interaction qti-gap::part(drag):focus:not(:active) {
|
|
4077
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4078
|
+
outline-offset: var(--qti-focus-offset);
|
|
3417
4079
|
}
|
|
3418
4080
|
|
|
3419
4081
|
qti-gap-match-interaction qti-gap-text:is(:state(placeholder), [data-state~='placeholder']) {
|
|
3420
4082
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
3421
|
-
shadow
|
|
3422
|
-
|
|
3423
|
-
with no specificity contest. The one thing
|
|
3424
|
-
|
|
4083
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
4084
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
4085
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
4086
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
4087
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
3425
4088
|
--drag-color: transparent;
|
|
4089
|
+
--qti-grip-color: transparent;
|
|
3426
4090
|
--drag-opacity: 1;
|
|
3427
4091
|
pointer-events: none;
|
|
3428
4092
|
}
|
|
3429
4093
|
|
|
3430
4094
|
qti-gap-match-interaction qti-gap-text:is(:state(dragging), [data-state~='dragging']) {
|
|
3431
4095
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
3432
|
-
shadow
|
|
3433
|
-
|
|
3434
|
-
with no specificity contest. The one thing
|
|
3435
|
-
|
|
4096
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
4097
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
4098
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
4099
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
4100
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
3436
4101
|
--drag-color: transparent;
|
|
4102
|
+
--qti-grip-color: transparent;
|
|
3437
4103
|
--drag-opacity: 1;
|
|
3438
4104
|
border-color: var(--qti-drop-highlight-border-color);
|
|
3439
4105
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
3440
|
-
color-mix(in
|
|
4106
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
3441
4107
|
pointer-events: none;
|
|
3442
4108
|
}
|
|
3443
4109
|
|
|
3444
4110
|
qti-gap-match-interaction qti-gap-text:is(:state(return-anchor), [data-state~='return-anchor']) {
|
|
3445
4111
|
border-color: var(--qti-drop-highlight-border-color);
|
|
3446
4112
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
3447
|
-
color-mix(in
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
qti-gap-match-interaction qti-gap:is(:state(hover), [data-state~='hover']),
|
|
3451
|
-
qti-gap-match-interaction qti-gap:is(:state(active), [data-state~='active']) {
|
|
3452
|
-
background-color: var(--qti-drop-highlight-bg);
|
|
4113
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
3453
4114
|
}
|
|
3454
4115
|
|
|
4116
|
+
qti-gap-match-interaction qti-gap:is(:state(active), [data-state~='active']),
|
|
3455
4117
|
qti-gap-match-interaction qti-gap:is(:state(enabled), [data-state~='enabled']) {
|
|
3456
4118
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
3457
4119
|
}
|
|
4120
|
+
|
|
4121
|
+
/* After `enabled`, which every target carries during a drag: the one under the chip. */
|
|
4122
|
+
qti-gap-match-interaction qti-gap:is(:state(hover), [data-state~='hover']) {
|
|
4123
|
+
background-color: var(--qti-drop-highlight-bg);
|
|
4124
|
+
outline: var(--qti-drop-highlight-border-width) solid var(--qti-drop-highlight-border-color);
|
|
4125
|
+
outline-offset: var(--qti-focus-offset);
|
|
4126
|
+
}
|
|
3458
4127
|
}
|
|
3459
4128
|
|
|
3460
4129
|
@layer qti-components.interactions.corrections {
|
|
@@ -3469,20 +4138,35 @@
|
|
|
3469
4138
|
DIRECTLY, which outranks the paint binding that reads --drag-background-color, so the solid fill
|
|
3470
4139
|
they asked for never rendered — a corrected gap-text has always been the pale tint. Left in place
|
|
3471
4140
|
they would have come alive the moment the shared rule left, and turned solid. */
|
|
3472
|
-
qti-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct'])
|
|
3473
|
-
|
|
4141
|
+
qti-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
4142
|
+
--drag-background-color: var(--qti-correct-light);
|
|
4143
|
+
--drag-color: var(--qti-correct);
|
|
4144
|
+
--drag-border-color: var(--qti-correct);
|
|
4145
|
+
--drag-box-shadow: none;
|
|
4146
|
+
--qti-grip-color: var(--qti-correct);
|
|
4147
|
+
}
|
|
4148
|
+
qti-gap::part(drag):state(candidate-correct) {
|
|
3474
4149
|
--drag-background-color: var(--qti-correct-light);
|
|
3475
4150
|
--drag-color: var(--qti-correct);
|
|
3476
4151
|
--drag-border-color: var(--qti-correct);
|
|
3477
4152
|
--drag-box-shadow: none;
|
|
4153
|
+
--qti-grip-color: var(--qti-correct);
|
|
3478
4154
|
}
|
|
3479
4155
|
|
|
3480
|
-
qti-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect'])
|
|
3481
|
-
qti-gap::part(drag):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
4156
|
+
qti-gap-match-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
3482
4157
|
--drag-background-color: var(--qti-incorrect-light);
|
|
3483
4158
|
--drag-color: var(--qti-incorrect);
|
|
3484
4159
|
--drag-border-color: var(--qti-incorrect);
|
|
3485
4160
|
--drag-box-shadow: none;
|
|
4161
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
qti-gap::part(drag):state(candidate-incorrect) {
|
|
4165
|
+
--drag-background-color: var(--qti-incorrect-light);
|
|
4166
|
+
--drag-color: var(--qti-incorrect);
|
|
4167
|
+
--drag-border-color: var(--qti-incorrect);
|
|
4168
|
+
--drag-box-shadow: none;
|
|
4169
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
3486
4170
|
}
|
|
3487
4171
|
|
|
3488
4172
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
@@ -3517,9 +4201,9 @@
|
|
|
3517
4201
|
@layer qti-components.interactions.base {
|
|
3518
4202
|
qti-hotspot-interaction qti-hotspot-choice {
|
|
3519
4203
|
/* Resting: a faint neutral ring, so the regions are discoverable before any interaction. */
|
|
3520
|
-
--hs-ring: color-mix(in
|
|
4204
|
+
--hs-ring: color-mix(in oklab, var(--qti-hotspot-ring-color, var(--qti-border-color)) 60%, transparent);
|
|
3521
4205
|
--hs-width: var(--qti-hotspot-ring-width, 2px);
|
|
3522
|
-
--hs-halo: var(--qti-hotspot-halo
|
|
4206
|
+
--hs-halo: var(--qti-hotspot-halo);
|
|
3523
4207
|
|
|
3524
4208
|
background-color: transparent;
|
|
3525
4209
|
cursor: pointer;
|
|
@@ -3552,12 +4236,12 @@
|
|
|
3552
4236
|
|
|
3553
4237
|
/* Hover strengthens the resting ring rather than filling the shape. */
|
|
3554
4238
|
qti-hotspot-interaction qti-hotspot-choice:hover {
|
|
3555
|
-
--hs-ring: color-mix(in
|
|
4239
|
+
--hs-ring: color-mix(in oklab, var(--qti-hotspot-ring-color, var(--qti-border-active)) 90%, transparent);
|
|
3556
4240
|
}
|
|
3557
4241
|
|
|
3558
|
-
qti-hotspot-interaction qti-hotspot-choice:focus
|
|
4242
|
+
qti-hotspot-interaction qti-hotspot-choice:focus {
|
|
3559
4243
|
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3560
|
-
outline-offset:
|
|
4244
|
+
outline-offset: var(--qti-focus-offset);
|
|
3561
4245
|
}
|
|
3562
4246
|
}
|
|
3563
4247
|
|
|
@@ -3599,13 +4283,13 @@
|
|
|
3599
4283
|
*
|
|
3600
4284
|
* Blank the ring and its halo while a hotspot is neither selected nor keyboard-focused. Both
|
|
3601
4285
|
* halves matter: the picture reads cleanly, and a *focused* hotspot returns, which is the only
|
|
3602
|
-
* thing that keeps the interaction operable from a keyboard — drop `:not(:focus
|
|
4286
|
+
* thing that keeps the interaction operable from a keyboard — drop `:not(:focus)` and
|
|
3603
4287
|
* tabbing through an item shows nothing.
|
|
3604
4288
|
*
|
|
3605
4289
|
* In `states` so it outranks the base ring and the `:hover` strengthen: hover must NOT reveal, or
|
|
3606
4290
|
* sweeping the pointer hands back the answer regions one at a time.
|
|
3607
4291
|
*/
|
|
3608
|
-
qti-hotspot-interaction.qti-unselected-hidden qti-hotspot-choice:not(:is(:state(checked), [data-state~='checked'])):not(:focus
|
|
4292
|
+
qti-hotspot-interaction.qti-unselected-hidden qti-hotspot-choice:not(:is(:state(checked), [data-state~='checked'])):not(:focus) {
|
|
3609
4293
|
--hs-ring: transparent;
|
|
3610
4294
|
--hs-halo: transparent;
|
|
3611
4295
|
}
|
|
@@ -3663,7 +4347,8 @@
|
|
|
3663
4347
|
|
|
3664
4348
|
@layer qti-components.interactions.base {
|
|
3665
4349
|
qti-hottext-interaction {
|
|
3666
|
-
|
|
4350
|
+
/* A hottext is a word in a sentence: the inline-field box, as a text entry and a gap have. */
|
|
4351
|
+
--qti-hottext-selected-padding: var(--qti-inline-field-padding);
|
|
3667
4352
|
|
|
3668
4353
|
/* The native radio/checkbox control is never rendered for a hottext — every variant uses custom
|
|
3669
4354
|
styling. That is unconditional, so it lives in qti-hottext.styles.ts, which hides [part='control']
|
|
@@ -3681,41 +4366,51 @@
|
|
|
3681
4366
|
* target's active border: pay the space once, up front, so the state has only to repaint. Every
|
|
3682
4367
|
* hottext is now the size a selected one used to be, which is also a larger target to click.
|
|
3683
4368
|
*/
|
|
4369
|
+
/* A word you pick, like a choice: a pointer cursor, and the ring on :focus so a word picked
|
|
4370
|
+
with the mouse shows it too. */
|
|
3684
4371
|
}
|
|
3685
4372
|
qti-hottext-interaction qti-hottext {
|
|
4373
|
+
margin-inline: var(--qti-inline-gap);
|
|
4374
|
+
line-height: var(--qti-field-line-height);
|
|
4375
|
+
--qti-padding-box: var(--qti-inline-field-padding);
|
|
4376
|
+
/* The correction badge sits as far in from the end as the text does from the start. */
|
|
4377
|
+
--qti-correction-inset: var(--qti-inline-padding-inline);
|
|
3686
4378
|
padding: var(--qti-hottext-selected-padding);
|
|
4379
|
+
cursor: pointer;
|
|
3687
4380
|
}
|
|
3688
4381
|
qti-hottext-interaction.qti-input-control-hidden qti-hottext {
|
|
3689
4382
|
border: var(--qti-border);
|
|
3690
|
-
border-radius: var(--qti-
|
|
4383
|
+
border-radius: var(--qti-radius-selector);
|
|
3691
4384
|
|
|
3692
4385
|
background: var(--qti-bg);
|
|
3693
4386
|
}
|
|
3694
4387
|
|
|
3695
|
-
|
|
3696
4388
|
:is(qti-hottext-interaction.qti-input-control-hidden qti-hottext):focus {
|
|
3697
|
-
|
|
4389
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4390
|
+
outline-offset: var(--qti-focus-offset);
|
|
3698
4391
|
}
|
|
3699
4392
|
qti-hottext-interaction.qti-unselected-hidden qti-hottext {
|
|
3700
4393
|
border: 0;
|
|
3701
|
-
border-radius: var(--qti-
|
|
4394
|
+
border-radius: var(--qti-radius-selector);
|
|
3702
4395
|
background-color: transparent;
|
|
3703
|
-
outline: none;
|
|
3704
4396
|
cursor: pointer;
|
|
3705
4397
|
}
|
|
3706
4398
|
|
|
3707
|
-
|
|
3708
4399
|
:is(qti-hottext-interaction.qti-unselected-hidden qti-hottext):focus {
|
|
3709
|
-
|
|
4400
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4401
|
+
outline-offset: var(--qti-focus-offset);
|
|
3710
4402
|
}
|
|
3711
4403
|
qti-hottext-interaction:not(.qti-input-control-hidden,.qti-unselected-hidden) qti-hottext {
|
|
3712
4404
|
border: var(--qti-border);
|
|
3713
|
-
border-radius: var(--qti-
|
|
4405
|
+
border-radius: var(--qti-radius-selector);
|
|
4406
|
+
/* The field surface, as a text entry has: on a tinted page, or in a theme without borders,
|
|
4407
|
+
the fill is what shows a word can be picked. White on white changes nothing. */
|
|
4408
|
+
background-color: var(--qti-bg);
|
|
3714
4409
|
}
|
|
3715
4410
|
|
|
3716
|
-
|
|
3717
4411
|
:is(qti-hottext-interaction:not(.qti-input-control-hidden,.qti-unselected-hidden) qti-hottext):focus {
|
|
3718
|
-
|
|
4412
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4413
|
+
outline-offset: var(--qti-focus-offset);
|
|
3719
4414
|
}
|
|
3720
4415
|
}
|
|
3721
4416
|
|
|
@@ -3733,7 +4428,10 @@
|
|
|
3733
4428
|
:is(qti-hottext-interaction.qti-input-control-hidden qti-hottext):is(:state(disabled), [data-state~='disabled']) {
|
|
3734
4429
|
cursor: not-allowed;
|
|
3735
4430
|
}
|
|
4431
|
+
/* The edge takes the selected colour with the fill, as a selected choice's does, so a picked
|
|
4432
|
+
word is one solid shape rather than a filled box inside a grey frame. */
|
|
3736
4433
|
:is(qti-hottext-interaction.qti-unselected-hidden qti-hottext,qti-hottext-interaction:not(.qti-input-control-hidden,.qti-unselected-hidden) qti-hottext):is(:state(checked), [data-state~='checked']) {
|
|
4434
|
+
border-color: var(--qti-border-active);
|
|
3737
4435
|
background-color: var(--qti-selected-bg);
|
|
3738
4436
|
color: var(--qti-selected-color);
|
|
3739
4437
|
}
|
|
@@ -3830,6 +4528,11 @@
|
|
|
3830
4528
|
color: var(--field-color, var(--qti-component-color));
|
|
3831
4529
|
opacity: var(--field-opacity, var(--qti-component-opacity));
|
|
3832
4530
|
filter: var(--field-filter, var(--qti-component-filter));
|
|
4531
|
+
margin-inline: var(--qti-inline-gap);
|
|
4532
|
+
line-height: var(--qti-field-line-height);
|
|
4533
|
+
--qti-padding-box: var(--qti-inline-field-padding);
|
|
4534
|
+
/* The correction badge sits as far in from the end as the text does from the start. */
|
|
4535
|
+
--qti-correction-inset: var(--qti-inline-padding-inline);
|
|
3833
4536
|
--field-color: var(--qti-fg);
|
|
3834
4537
|
|
|
3835
4538
|
/* ── Trigger: transparent inside the field border ───────────────────────── */
|
|
@@ -3842,11 +4545,17 @@
|
|
|
3842
4545
|
color: inherit;
|
|
3843
4546
|
cursor: pointer;
|
|
3844
4547
|
font-size: inherit;
|
|
4548
|
+
/* The same line as a text entry's input (@mixin field-typography), so the two fields sit in a
|
|
4549
|
+
sentence at the same height. `normal` made the dropdown about 6px shorter. */
|
|
4550
|
+
line-height: var(--qti-field-line-height);
|
|
3845
4551
|
}
|
|
3846
4552
|
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
4553
|
+
/* The trigger fills the field inside its border, so its ring is pushed out past that border:
|
|
4554
|
+
it then sits where a text entry's does, which rings its host. */
|
|
4555
|
+
qti-inline-choice-interaction::part(trigger):focus {
|
|
4556
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4557
|
+
outline-offset: var(--qti-focus-offset);
|
|
4558
|
+
outline-offset: var(--qti-focus-offset-past-border);
|
|
3850
4559
|
}
|
|
3851
4560
|
|
|
3852
4561
|
qti-inline-choice-interaction:is(:state(disabled), [data-state~='disabled'])::part(trigger),qti-inline-choice-interaction[disabled]::part(trigger) {
|
|
@@ -3891,6 +4600,7 @@
|
|
|
3891
4600
|
color: var(--menu-color, var(--qti-component-color));
|
|
3892
4601
|
opacity: var(--menu-opacity, var(--qti-component-opacity));
|
|
3893
4602
|
filter: var(--menu-filter, var(--qti-component-filter));
|
|
4603
|
+
border-radius: var(--menu-border-radius, var(--qti-radius-box));
|
|
3894
4604
|
padding: 0;
|
|
3895
4605
|
}
|
|
3896
4606
|
|
|
@@ -3937,8 +4647,8 @@
|
|
|
3937
4647
|
}
|
|
3938
4648
|
|
|
3939
4649
|
qti-inline-choice-interaction::part(option):focus-visible {
|
|
3940
|
-
|
|
3941
|
-
outline:
|
|
4650
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4651
|
+
outline-offset: var(--qti-focus-offset-inset);
|
|
3942
4652
|
}
|
|
3943
4653
|
|
|
3944
4654
|
qti-inline-choice-interaction::part(option-selected) {
|
|
@@ -3965,8 +4675,8 @@
|
|
|
3965
4675
|
}
|
|
3966
4676
|
|
|
3967
4677
|
qti-inline-choice-interaction qti-inline-choice:focus-visible {
|
|
3968
|
-
|
|
3969
|
-
outline:
|
|
4678
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
4679
|
+
outline-offset: var(--qti-focus-offset-inset);
|
|
3970
4680
|
}
|
|
3971
4681
|
|
|
3972
4682
|
qti-inline-choice-interaction qti-inline-choice:is(:state(checked), [data-state~='checked']) {
|
|
@@ -3987,8 +4697,9 @@
|
|
|
3987
4697
|
color: var(--message-color, var(--qti-component-color));
|
|
3988
4698
|
opacity: var(--message-opacity, var(--qti-component-opacity));
|
|
3989
4699
|
filter: var(--message-filter, var(--qti-component-filter));
|
|
4700
|
+
border-radius: var(--message-border-radius, var(--qti-radius-box));
|
|
3990
4701
|
--message-color: var(--qti-fg);
|
|
3991
|
-
--message-background-color: color-mix(in
|
|
4702
|
+
--message-background-color: color-mix(in oklab, var(--qti-warning) 5%, var(--qti-bg));
|
|
3992
4703
|
--message-border-color: var(--qti-warning);
|
|
3993
4704
|
padding: var(--qti-padding-box);
|
|
3994
4705
|
}
|
|
@@ -4011,6 +4722,7 @@
|
|
|
4011
4722
|
--field-color: var(--qti-correct);
|
|
4012
4723
|
--field-border-color: var(--qti-correct);
|
|
4013
4724
|
--field-box-shadow: none;
|
|
4725
|
+
--qti-grip-color: var(--qti-correct);
|
|
4014
4726
|
}
|
|
4015
4727
|
|
|
4016
4728
|
qti-inline-choice-interaction:is(:state(candidate-correct), [data-state~='candidate-correct'])::part(trigger) {
|
|
@@ -4022,6 +4734,7 @@
|
|
|
4022
4734
|
--field-color: var(--qti-incorrect);
|
|
4023
4735
|
--field-border-color: var(--qti-incorrect);
|
|
4024
4736
|
--field-box-shadow: none;
|
|
4737
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
4025
4738
|
}
|
|
4026
4739
|
|
|
4027
4740
|
qti-inline-choice-interaction:is(:state(candidate-incorrect), [data-state~='candidate-incorrect'])::part(trigger) {
|
|
@@ -4052,6 +4765,7 @@
|
|
|
4052
4765
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4053
4766
|
box-sizing: border-box;
|
|
4054
4767
|
padding: var(--qti-drag-padding);
|
|
4768
|
+
line-height: var(--qti-field-line-height);
|
|
4055
4769
|
cursor: grab;
|
|
4056
4770
|
/*
|
|
4057
4771
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4094,6 +4808,18 @@
|
|
|
4094
4808
|
color: var(--drag-color, var(--qti-component-color));
|
|
4095
4809
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4096
4810
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
4811
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
4812
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
4813
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
4814
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
4815
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
4816
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
4817
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
4818
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
4819
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
4820
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
4821
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
4822
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4097
4823
|
}
|
|
4098
4824
|
|
|
4099
4825
|
qti-match-interaction :is(:state(drag), [data-state~='drag'])::part(control)::before,
|
|
@@ -4106,7 +4832,9 @@
|
|
|
4106
4832
|
width: 0.75em;
|
|
4107
4833
|
height: 1em;
|
|
4108
4834
|
margin-right: var(--qti-glyph-gap);
|
|
4109
|
-
|
|
4835
|
+
/* A verdict (`@mixin candidate`) sets --qti-grip-color, so a corrected chip's handle takes the
|
|
4836
|
+
verdict colour even when a brand colours its handles. */
|
|
4837
|
+
background-color: var(--qti-grip-color, var(--cito-color-drag-icon, currentColor));
|
|
4110
4838
|
mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4111
4839
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4112
4840
|
}
|
|
@@ -4122,6 +4850,7 @@
|
|
|
4122
4850
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4123
4851
|
box-sizing: border-box;
|
|
4124
4852
|
padding: var(--qti-drag-padding);
|
|
4853
|
+
line-height: var(--qti-field-line-height);
|
|
4125
4854
|
cursor: grab;
|
|
4126
4855
|
/*
|
|
4127
4856
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4164,19 +4893,19 @@
|
|
|
4164
4893
|
color: var(--drag-color, var(--qti-component-color));
|
|
4165
4894
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4166
4895
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
4896
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
4897
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
4898
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
4899
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
4900
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
4901
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
4902
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
4903
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
4904
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
4905
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
4906
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
4907
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4167
4908
|
}
|
|
4168
|
-
@media (hover: hover) {
|
|
4169
|
-
:is(qti-simple-associable-choice::part(drag)):hover {
|
|
4170
|
-
background-color: color-mix(
|
|
4171
|
-
in srgb,
|
|
4172
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
4173
|
-
black
|
|
4174
|
-
);
|
|
4175
|
-
}
|
|
4176
|
-
}
|
|
4177
|
-
:is(qti-simple-associable-choice::part(drag)):focus {
|
|
4178
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
4179
|
-
}
|
|
4180
4909
|
|
|
4181
4910
|
qti-match-interaction:not(.qti-match-tabular) {
|
|
4182
4911
|
/*
|
|
@@ -4208,6 +4937,7 @@
|
|
|
4208
4937
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4209
4938
|
box-sizing: border-box;
|
|
4210
4939
|
padding: var(--qti-drag-padding);
|
|
4940
|
+
line-height: var(--qti-field-line-height);
|
|
4211
4941
|
cursor: grab;
|
|
4212
4942
|
/*
|
|
4213
4943
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4250,23 +4980,32 @@
|
|
|
4250
4980
|
color: var(--drag-color, var(--qti-component-color));
|
|
4251
4981
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4252
4982
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
4983
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
4984
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
4985
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
4986
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
4987
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
4988
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
4989
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
4990
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
4991
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
4992
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
4993
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
4994
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4253
4995
|
}
|
|
4254
4996
|
[dragging]:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:first-of-type) qti-simple-associable-choice) {
|
|
4255
4997
|
pointer-events: none;
|
|
4256
4998
|
rotate: -2deg;
|
|
4257
|
-
--drag-box-shadow:
|
|
4999
|
+
--drag-box-shadow: var(--qti-drag-elevation);
|
|
4258
5000
|
}
|
|
4259
|
-
@media (hover: hover) {
|
|
5001
|
+
@media (hover: hover) and (pointer: fine) {
|
|
4260
5002
|
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:first-of-type) qti-simple-associable-choice):hover {
|
|
4261
|
-
|
|
4262
|
-
in srgb,
|
|
4263
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
4264
|
-
black
|
|
4265
|
-
);
|
|
5003
|
+
--drag-border-color: var(--qti-border-active);
|
|
4266
5004
|
}
|
|
4267
5005
|
}
|
|
4268
|
-
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:first-of-type) qti-simple-associable-choice):focus {
|
|
4269
|
-
|
|
5006
|
+
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:first-of-type) qti-simple-associable-choice):focus:not(:is(:state(placeholder), [data-state~='placeholder']),:active) {
|
|
5007
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5008
|
+
outline-offset: var(--qti-focus-offset);
|
|
4270
5009
|
}
|
|
4271
5010
|
qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type {
|
|
4272
5011
|
gap: var(--qti-gap);
|
|
@@ -4302,14 +5041,15 @@
|
|
|
4302
5041
|
used to LEAK: `dragging` sets --component-box-shadow, one shared namespace, so it
|
|
4303
5042
|
inherited onto every chip nested in the drop. That half is now structural — `dragging`
|
|
4304
5043
|
sets --drag-box-shadow, which a drop does not read.) */
|
|
4305
|
-
}
|
|
4306
|
-
:is(:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice)::part(drop)):focus {
|
|
4307
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
4308
|
-
}
|
|
4309
|
-
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice)::part(drop) {
|
|
4310
5044
|
margin-top: var(--qti-gap);
|
|
4311
5045
|
gap: var(--qti-gap);
|
|
4312
5046
|
}
|
|
5047
|
+
/* The ring goes on the target itself: it is what takes keyboard focus. Nothing in its shadow
|
|
5048
|
+
is focusable, so the `::part(drop):focus` this replaces never matched. */
|
|
5049
|
+
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice):focus:not(:is(:state(placeholder), [data-state~='placeholder'])) {
|
|
5050
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5051
|
+
outline-offset: var(--qti-focus-offset);
|
|
5052
|
+
}
|
|
4313
5053
|
:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice) > *:not(qti-simple-associable-choice) {
|
|
4314
5054
|
pointer-events: none;
|
|
4315
5055
|
}
|
|
@@ -4323,6 +5063,7 @@
|
|
|
4323
5063
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4324
5064
|
box-sizing: border-box;
|
|
4325
5065
|
padding: var(--qti-drag-padding);
|
|
5066
|
+
line-height: var(--qti-field-line-height);
|
|
4326
5067
|
cursor: grab;
|
|
4327
5068
|
/*
|
|
4328
5069
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4365,18 +5106,27 @@
|
|
|
4365
5106
|
color: var(--drag-color, var(--qti-component-color));
|
|
4366
5107
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4367
5108
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5109
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5110
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5111
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5112
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5113
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5114
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5115
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5116
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5117
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5118
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5119
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5120
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4368
5121
|
}
|
|
4369
|
-
@media (hover: hover) {
|
|
5122
|
+
@media (hover: hover) and (pointer: fine) {
|
|
4370
5123
|
:is(:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice) > qti-simple-associable-choice):hover {
|
|
4371
|
-
|
|
4372
|
-
in srgb,
|
|
4373
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
4374
|
-
black
|
|
4375
|
-
);
|
|
5124
|
+
--drag-border-color: var(--qti-border-active);
|
|
4376
5125
|
}
|
|
4377
5126
|
}
|
|
4378
|
-
:is(:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice) > qti-simple-associable-choice):focus {
|
|
4379
|
-
|
|
5127
|
+
:is(:is(:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type) > qti-simple-associable-choice) > qti-simple-associable-choice):focus:not(:is(:state(placeholder), [data-state~='placeholder']),:active) {
|
|
5128
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5129
|
+
outline-offset: var(--qti-focus-offset);
|
|
4380
5130
|
}
|
|
4381
5131
|
|
|
4382
5132
|
qti-match-interaction:not(.qti-match-tabular)
|
|
@@ -4388,6 +5138,7 @@
|
|
|
4388
5138
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4389
5139
|
box-sizing: border-box;
|
|
4390
5140
|
padding: var(--qti-drag-padding);
|
|
5141
|
+
line-height: var(--qti-field-line-height);
|
|
4391
5142
|
cursor: grab;
|
|
4392
5143
|
/*
|
|
4393
5144
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4430,14 +5181,26 @@
|
|
|
4430
5181
|
color: var(--drag-color, var(--qti-component-color));
|
|
4431
5182
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4432
5183
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5184
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5185
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5186
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5187
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5188
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5189
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5190
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5191
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5192
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5193
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5194
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5195
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4433
5196
|
}
|
|
4434
5197
|
/* The label's `align-content` and the drop's `flex-grow` are the target card's own box, and live
|
|
4435
5198
|
in qti-simple-associable-choice.styles.ts under :host(:state(droppable)). `box-sizing` went with
|
|
4436
5199
|
them: border-box is already the reset, and content-box is what dropRegion sets. */
|
|
4437
5200
|
:is(qti-match-interaction:not(.qti-match-tabular) qti-simple-match-set:last-of-type > qti-simple-associable-choice)::part(label) {
|
|
4438
5201
|
border: var(--qti-border);
|
|
4439
|
-
border-top-left-radius: var(--qti-
|
|
4440
|
-
border-top-right-radius: var(--qti-
|
|
5202
|
+
border-top-left-radius: var(--qti-radius-box);
|
|
5203
|
+
border-top-right-radius: var(--qti-radius-box);
|
|
4441
5204
|
padding: 0.5rem;
|
|
4442
5205
|
}
|
|
4443
5206
|
|
|
@@ -4451,6 +5214,22 @@
|
|
|
4451
5214
|
}
|
|
4452
5215
|
|
|
4453
5216
|
@layer qti-components.interactions.states {
|
|
5217
|
+
/*
|
|
5218
|
+
* A placed chip's hover and focus ring. Written flat: nested under `&::part(drag)` they
|
|
5219
|
+
* compiled to `:is(…::part(drag)):hover`, and a pseudo-element cannot sit inside `:is()`, so none
|
|
5220
|
+
* of them ever matched. In this layer, after the chip rule, because `@mixin drag` sets
|
|
5221
|
+
* `background-color` and must not out-rank the hover.
|
|
5222
|
+
*/
|
|
5223
|
+
@media (hover: hover) and (pointer: fine) {
|
|
5224
|
+
qti-simple-associable-choice::part(drag):hover {
|
|
5225
|
+
--drag-border-color: var(--qti-border-active);
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5228
|
+
qti-simple-associable-choice::part(drag):focus:not(:active) {
|
|
5229
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5230
|
+
outline-offset: var(--qti-focus-offset);
|
|
5231
|
+
}
|
|
5232
|
+
|
|
4454
5233
|
qti-match-interaction:not(.qti-match-tabular)
|
|
4455
5234
|
qti-simple-match-set:first-of-type
|
|
4456
5235
|
qti-simple-associable-choice:is(:state(dragging), [data-state~='dragging']),
|
|
@@ -4458,11 +5237,13 @@
|
|
|
4458
5237
|
qti-simple-match-set:first-of-type
|
|
4459
5238
|
qti-simple-associable-choice:is(:state(placeholder), [data-state~='placeholder']) {
|
|
4460
5239
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
4461
|
-
shadow
|
|
4462
|
-
|
|
4463
|
-
with no specificity contest. The one thing
|
|
4464
|
-
|
|
5240
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
5241
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
5242
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
5243
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
5244
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
4465
5245
|
--drag-color: transparent;
|
|
5246
|
+
--qti-grip-color: transparent;
|
|
4466
5247
|
--drag-opacity: 1;
|
|
4467
5248
|
pointer-events: none;
|
|
4468
5249
|
}
|
|
@@ -4489,17 +5270,20 @@
|
|
|
4489
5270
|
|
|
4490
5271
|
qti-match-interaction:not(.qti-match-tabular)
|
|
4491
5272
|
qti-simple-match-set:last-of-type
|
|
4492
|
-
> qti-simple-associable-choice:is(:state(
|
|
5273
|
+
> qti-simple-associable-choice:is(:state(active), [data-state~='active'])::part(drop),
|
|
4493
5274
|
qti-match-interaction:not(.qti-match-tabular)
|
|
4494
5275
|
qti-simple-match-set:last-of-type
|
|
4495
|
-
> qti-simple-associable-choice:is(:state(
|
|
4496
|
-
background-color: var(--qti-drop-highlight-bg);
|
|
5276
|
+
> qti-simple-associable-choice:is(:state(enabled), [data-state~='enabled'])::part(drop) {
|
|
5277
|
+
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
4497
5278
|
}
|
|
4498
5279
|
|
|
5280
|
+
/* After `enabled`, which every target carries during a drag: the one under the chip. */
|
|
4499
5281
|
qti-match-interaction:not(.qti-match-tabular)
|
|
4500
5282
|
qti-simple-match-set:last-of-type
|
|
4501
|
-
> qti-simple-associable-choice:is(:state(
|
|
4502
|
-
background-color: var(--qti-drop-highlight-
|
|
5283
|
+
> qti-simple-associable-choice:is(:state(hover), [data-state~='hover'])::part(drop) {
|
|
5284
|
+
background-color: var(--qti-drop-highlight-bg);
|
|
5285
|
+
outline: var(--qti-drop-highlight-border-width) solid var(--qti-drop-highlight-border-color);
|
|
5286
|
+
outline-offset: var(--qti-focus-offset);
|
|
4503
5287
|
}
|
|
4504
5288
|
|
|
4505
5289
|
qti-match-interaction:not(.qti-match-tabular)
|
|
@@ -4507,7 +5291,7 @@
|
|
|
4507
5291
|
qti-simple-associable-choice:is(:state(dragging), [data-state~='dragging']) {
|
|
4508
5292
|
border-color: var(--qti-drop-highlight-border-color);
|
|
4509
5293
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
4510
|
-
color-mix(in
|
|
5294
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
4511
5295
|
}
|
|
4512
5296
|
|
|
4513
5297
|
qti-match-interaction:not(.qti-match-tabular)
|
|
@@ -4515,7 +5299,7 @@
|
|
|
4515
5299
|
qti-simple-associable-choice:is(:state(return-anchor), [data-state~='return-anchor']) {
|
|
4516
5300
|
border-color: var(--qti-drop-highlight-border-color);
|
|
4517
5301
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
4518
|
-
color-mix(in
|
|
5302
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
4519
5303
|
}
|
|
4520
5304
|
}
|
|
4521
5305
|
|
|
@@ -4530,20 +5314,35 @@
|
|
|
4530
5314
|
same reason as gap-match's: the shared rule's DIRECT `background-color` outranked the binding
|
|
4531
5315
|
that reads them, so their solid fill never rendered. They out-specify this block, so leaving them
|
|
4532
5316
|
would have flipped a corrected placed chip from the pale tint to solid. */
|
|
4533
|
-
qti-match-interaction:not(.qti-match-tabular) :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct'])
|
|
4534
|
-
|
|
5317
|
+
qti-match-interaction:not(.qti-match-tabular) :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
5318
|
+
--drag-background-color: var(--qti-correct-light);
|
|
5319
|
+
--drag-color: var(--qti-correct);
|
|
5320
|
+
--drag-border-color: var(--qti-correct);
|
|
5321
|
+
--drag-box-shadow: none;
|
|
5322
|
+
--qti-grip-color: var(--qti-correct);
|
|
5323
|
+
}
|
|
5324
|
+
qti-match-interaction:not(.qti-match-tabular) qti-simple-associable-choice::part(drag):state(candidate-correct) {
|
|
4535
5325
|
--drag-background-color: var(--qti-correct-light);
|
|
4536
5326
|
--drag-color: var(--qti-correct);
|
|
4537
5327
|
--drag-border-color: var(--qti-correct);
|
|
4538
5328
|
--drag-box-shadow: none;
|
|
5329
|
+
--qti-grip-color: var(--qti-correct);
|
|
5330
|
+
}
|
|
5331
|
+
|
|
5332
|
+
qti-match-interaction:not(.qti-match-tabular) :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
5333
|
+
--drag-background-color: var(--qti-incorrect-light);
|
|
5334
|
+
--drag-color: var(--qti-incorrect);
|
|
5335
|
+
--drag-border-color: var(--qti-incorrect);
|
|
5336
|
+
--drag-box-shadow: none;
|
|
5337
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
4539
5338
|
}
|
|
4540
5339
|
|
|
4541
|
-
qti-match-interaction:not(.qti-match-tabular)
|
|
4542
|
-
qti-match-interaction:not(.qti-match-tabular) qti-simple-associable-choice::part(drag):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
5340
|
+
qti-match-interaction:not(.qti-match-tabular) qti-simple-associable-choice::part(drag):state(candidate-incorrect) {
|
|
4543
5341
|
--drag-background-color: var(--qti-incorrect-light);
|
|
4544
5342
|
--drag-color: var(--qti-incorrect);
|
|
4545
5343
|
--drag-border-color: var(--qti-incorrect);
|
|
4546
5344
|
--drag-box-shadow: none;
|
|
5345
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
4547
5346
|
}
|
|
4548
5347
|
|
|
4549
5348
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
@@ -4600,12 +5399,13 @@
|
|
|
4600
5399
|
color: var(--checkbox-color, var(--qti-component-color));
|
|
4601
5400
|
opacity: var(--checkbox-opacity, var(--qti-component-opacity));
|
|
4602
5401
|
filter: var(--checkbox-filter, var(--qti-component-filter));
|
|
5402
|
+
border-radius: var(--checkbox-border-radius, var(--qti-radius-selector));
|
|
4603
5403
|
width: var(--qti-control-size);
|
|
4604
5404
|
height: var(--qti-control-size);
|
|
4605
5405
|
}
|
|
4606
5406
|
qti-match-interaction.qti-match-tabular::part(control-mark) {
|
|
4607
|
-
width: calc(var(--qti-control-size) * 0.625);
|
|
4608
|
-
height: calc(var(--qti-control-size) * 0.625);
|
|
5407
|
+
width: round(calc(var(--qti-control-size) * 0.625), 2px);
|
|
5408
|
+
height: round(calc(var(--qti-control-size) * 0.625), 2px);
|
|
4609
5409
|
}
|
|
4610
5410
|
/* Both `control` and `control-mark` carry the variant tokens, so themes can repaint the
|
|
4611
5411
|
outer box and the inner indicator independently. Scope the base inner-fill rules to
|
|
@@ -4613,13 +5413,13 @@
|
|
|
4613
5413
|
look (outer filled, e.g. Kennisnet) add their own `::part(control checked)` rules. */
|
|
4614
5414
|
qti-match-interaction.qti-match-tabular::part(control-mark radio checked) {
|
|
4615
5415
|
/* 0.5 reproduces today's 8px at the default 1rem — see mark-size for why this is a fraction. */
|
|
4616
|
-
width: calc(var(--qti-control-size) * 0.5);
|
|
4617
|
-
height: calc(var(--qti-control-size) * 0.5);
|
|
4618
|
-
background-color: var(--radio-mark-color,
|
|
5416
|
+
width: round(calc(var(--qti-control-size) * 0.5), 2px);
|
|
5417
|
+
height: round(calc(var(--qti-control-size) * 0.5), 2px);
|
|
5418
|
+
background-color: var(--radio-mark-color, var(--qti-primary-fg));
|
|
4619
5419
|
border-radius: 100%;
|
|
4620
5420
|
}
|
|
4621
5421
|
qti-match-interaction.qti-match-tabular::part(control-mark checkbox checked) {
|
|
4622
|
-
background-color: var(--checkbox-mark-color,
|
|
5422
|
+
background-color: var(--checkbox-mark-color, var(--qti-primary-fg));
|
|
4623
5423
|
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
4624
5424
|
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
4625
5425
|
}
|
|
@@ -4658,12 +5458,19 @@
|
|
|
4658
5458
|
gap: 1px;
|
|
4659
5459
|
background-color: var(--qti-border-color);
|
|
4660
5460
|
border: var(--qti-border-thickness) solid var(--qti-border-color);
|
|
4661
|
-
border-radius: var(--qti-
|
|
5461
|
+
border-radius: var(--qti-radius-box);
|
|
4662
5462
|
}
|
|
4663
5463
|
|
|
4664
5464
|
qti-match-interaction.qti-match-tabular::part(corner),qti-match-interaction.qti-match-tabular::part(input-cell) {
|
|
4665
5465
|
border: none;
|
|
4666
|
-
background-color:
|
|
5466
|
+
background-color: var(--qti-bg);
|
|
5467
|
+
}
|
|
5468
|
+
|
|
5469
|
+
/* A cell's radio or checkbox is a real input, visually hidden: the cell rings while it has
|
|
5470
|
+
focus, inside its own edge, because the grid clips. */
|
|
5471
|
+
qti-match-interaction.qti-match-tabular::part(input-cell):focus-within {
|
|
5472
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5473
|
+
outline-offset: var(--qti-focus-offset-inset);
|
|
4667
5474
|
}
|
|
4668
5475
|
|
|
4669
5476
|
qti-match-interaction.qti-match-tabular::part(control checked) {
|
|
@@ -4672,18 +5479,18 @@
|
|
|
4672
5479
|
}
|
|
4673
5480
|
|
|
4674
5481
|
qti-match-interaction.qti-match-tabular::part(control-mark radio checked) {
|
|
4675
|
-
background-color:
|
|
5482
|
+
background-color: var(--qti-bg);
|
|
4676
5483
|
width: calc(var(--qti-control-size) * 0.5);
|
|
4677
5484
|
height: calc(var(--qti-control-size) * 0.5);
|
|
4678
5485
|
}
|
|
4679
5486
|
|
|
4680
5487
|
qti-match-interaction.qti-match-tabular::part(control-mark checkbox checked) {
|
|
4681
|
-
background-color:
|
|
5488
|
+
background-color: var(--qti-bg);
|
|
4682
5489
|
}
|
|
4683
5490
|
|
|
4684
5491
|
qti-match-interaction.qti-match-tabular qti-simple-match-set qti-simple-associable-choice {
|
|
4685
5492
|
border: none;
|
|
4686
|
-
background-color:
|
|
5493
|
+
background-color: var(--qti-bg);
|
|
4687
5494
|
}
|
|
4688
5495
|
}
|
|
4689
5496
|
|
|
@@ -4740,6 +5547,7 @@
|
|
|
4740
5547
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4741
5548
|
box-sizing: border-box;
|
|
4742
5549
|
padding: var(--qti-drag-padding);
|
|
5550
|
+
line-height: var(--qti-field-line-height);
|
|
4743
5551
|
cursor: grab;
|
|
4744
5552
|
/*
|
|
4745
5553
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4782,6 +5590,18 @@
|
|
|
4782
5590
|
color: var(--drag-color, var(--qti-component-color));
|
|
4783
5591
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4784
5592
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5593
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5594
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5595
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5596
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5597
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5598
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5599
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5600
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5601
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5602
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5603
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5604
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4785
5605
|
}
|
|
4786
5606
|
|
|
4787
5607
|
qti-order-interaction :is(:state(drag), [data-state~='drag'])::part(control)::before,
|
|
@@ -4794,7 +5614,9 @@
|
|
|
4794
5614
|
width: 0.75em;
|
|
4795
5615
|
height: 1em;
|
|
4796
5616
|
margin-right: var(--qti-glyph-gap);
|
|
4797
|
-
|
|
5617
|
+
/* A verdict (`@mixin candidate`) sets --qti-grip-color, so a corrected chip's handle takes the
|
|
5618
|
+
verdict colour even when a brand colours its handles. */
|
|
5619
|
+
background-color: var(--qti-grip-color, var(--cito-color-drag-icon, currentColor));
|
|
4798
5620
|
mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4799
5621
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
4800
5622
|
}
|
|
@@ -4807,12 +5629,13 @@
|
|
|
4807
5629
|
qti-order-interaction:is(:state(dragzone-enabled), [data-state~='dragzone-enabled'])::part(drags) {
|
|
4808
5630
|
background-color: var(--qti-bg-active);
|
|
4809
5631
|
}
|
|
4810
|
-
qti-order-interaction
|
|
5632
|
+
qti-order-interaction qti-simple-choice {
|
|
4811
5633
|
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
4812
5634
|
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
4813
5635
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4814
5636
|
box-sizing: border-box;
|
|
4815
5637
|
padding: var(--qti-drag-padding);
|
|
5638
|
+
line-height: var(--qti-field-line-height);
|
|
4816
5639
|
cursor: grab;
|
|
4817
5640
|
/*
|
|
4818
5641
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4855,35 +5678,42 @@
|
|
|
4855
5678
|
color: var(--drag-color, var(--qti-component-color));
|
|
4856
5679
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4857
5680
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5681
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5682
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5683
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5684
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5685
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5686
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5687
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5688
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5689
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5690
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5691
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5692
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4858
5693
|
}
|
|
4859
|
-
[dragging]:is(qti-order-interaction
|
|
5694
|
+
[dragging]:is(qti-order-interaction qti-simple-choice) {
|
|
4860
5695
|
pointer-events: none;
|
|
4861
5696
|
rotate: -2deg;
|
|
4862
|
-
--drag-box-shadow:
|
|
5697
|
+
--drag-box-shadow: var(--qti-drag-elevation);
|
|
4863
5698
|
}
|
|
4864
|
-
@media (hover: hover) {
|
|
4865
|
-
:is(qti-order-interaction
|
|
4866
|
-
|
|
4867
|
-
in srgb,
|
|
4868
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
4869
|
-
black
|
|
4870
|
-
);
|
|
5699
|
+
@media (hover: hover) and (pointer: fine) {
|
|
5700
|
+
:is(qti-order-interaction qti-simple-choice):hover {
|
|
5701
|
+
--drag-border-color: var(--qti-border-active);
|
|
4871
5702
|
}
|
|
4872
5703
|
}
|
|
4873
|
-
:is(qti-order-interaction
|
|
4874
|
-
|
|
5704
|
+
:is(qti-order-interaction qti-simple-choice):focus:not(:is(:state(placeholder), [data-state~='placeholder']),:active) {
|
|
5705
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5706
|
+
outline-offset: var(--qti-focus-offset);
|
|
4875
5707
|
}
|
|
4876
|
-
/*
|
|
4877
|
-
|
|
4878
|
-
Kept as its own block (separate from the runtime-drag selector list
|
|
4879
|
-
above) because a CSS comment between commas inside a nested selector
|
|
4880
|
-
list is silently dropped by Chrome's nesting parser. */
|
|
5708
|
+
/* A placed chip, and the editor's fake-drag projected into the drop-target shadow. Its hover,
|
|
5709
|
+
and ring are in the states layer below. */
|
|
4881
5710
|
qti-order-interaction::part(drag) {
|
|
4882
5711
|
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
4883
5712
|
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
4884
5713
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
4885
5714
|
box-sizing: border-box;
|
|
4886
5715
|
padding: var(--qti-drag-padding);
|
|
5716
|
+
line-height: var(--qti-field-line-height);
|
|
4887
5717
|
cursor: grab;
|
|
4888
5718
|
/*
|
|
4889
5719
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -4926,19 +5756,19 @@
|
|
|
4926
5756
|
color: var(--drag-color, var(--qti-component-color));
|
|
4927
5757
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
4928
5758
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5759
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5760
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5761
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5762
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5763
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5764
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5765
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5766
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5767
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5768
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5769
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5770
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
4929
5771
|
}
|
|
4930
|
-
@media (hover: hover) {
|
|
4931
|
-
:is(qti-order-interaction::part(drag)):hover {
|
|
4932
|
-
background-color: color-mix(
|
|
4933
|
-
in srgb,
|
|
4934
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
4935
|
-
black
|
|
4936
|
-
);
|
|
4937
|
-
}
|
|
4938
|
-
}
|
|
4939
|
-
:is(qti-order-interaction::part(drag)):focus {
|
|
4940
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
4941
|
-
}
|
|
4942
5772
|
/* The drag's box — flex, centred, clipped — is in qti-order-interaction.styles.ts. */
|
|
4943
5773
|
qti-order-interaction::part(drag) {
|
|
4944
5774
|
/*
|
|
@@ -4980,6 +5810,9 @@
|
|
|
4980
5810
|
qti-order-interaction::part(drags) {
|
|
4981
5811
|
gap: var(--qti-gap);
|
|
4982
5812
|
}
|
|
5813
|
+
/* Flat, not nested under `&::part(drop)`: that compiled to `:is(…::part(drop)):focus-visible`,
|
|
5814
|
+
which never matched. Deleted: a nested `&[enabled] { @mixin dropping }`. An attribute
|
|
5815
|
+
selector after ::part() never matches; `::part(enabled)` is the hook. */
|
|
4983
5816
|
qti-order-interaction::part(drop) {
|
|
4984
5817
|
background-color: var(--drop-background-color, var(--qti-component-background-color));
|
|
4985
5818
|
background-image: var(--drop-background-image, var(--qti-component-background-image));
|
|
@@ -4993,12 +5826,10 @@
|
|
|
4993
5826
|
filter: var(--drop-filter, var(--qti-component-filter));
|
|
4994
5827
|
border-style: var(--drop-border-style, dashed);
|
|
4995
5828
|
}
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
5001
|
-
}
|
|
5829
|
+
qti-order-interaction::part(drop):focus {
|
|
5830
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5831
|
+
outline-offset: var(--qti-focus-offset);
|
|
5832
|
+
}
|
|
5002
5833
|
qti-order-interaction::part(active) {
|
|
5003
5834
|
background-color: var(--qti-bg-active);
|
|
5004
5835
|
}
|
|
@@ -5040,6 +5871,7 @@
|
|
|
5040
5871
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
5041
5872
|
box-sizing: border-box;
|
|
5042
5873
|
padding: var(--qti-drag-padding);
|
|
5874
|
+
line-height: var(--qti-field-line-height);
|
|
5043
5875
|
cursor: grab;
|
|
5044
5876
|
/*
|
|
5045
5877
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -5082,6 +5914,18 @@
|
|
|
5082
5914
|
color: var(--drag-color, var(--qti-component-color));
|
|
5083
5915
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
5084
5916
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
5917
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
5918
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
5919
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
5920
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
5921
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
5922
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
5923
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
5924
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
5925
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
5926
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
5927
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
5928
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
5085
5929
|
}
|
|
5086
5930
|
|
|
5087
5931
|
qti-order-interaction::part(container) {
|
|
@@ -5107,45 +5951,68 @@
|
|
|
5107
5951
|
}
|
|
5108
5952
|
|
|
5109
5953
|
@layer qti-components.interactions.states {
|
|
5954
|
+
/*
|
|
5955
|
+
* A placed chip's hover and focus ring. Written flat: nested under `&::part(drag)` they
|
|
5956
|
+
* compiled to `:is(…::part(drag)):hover`, and a pseudo-element cannot sit inside `:is()`, so none
|
|
5957
|
+
* of them ever matched. In this layer, after the chip rule, because `@mixin drag` sets
|
|
5958
|
+
* `background-color` and must not out-rank the hover.
|
|
5959
|
+
*/
|
|
5960
|
+
@media (hover: hover) and (pointer: fine) {
|
|
5961
|
+
qti-order-interaction::part(drag):hover {
|
|
5962
|
+
--drag-border-color: var(--qti-border-active);
|
|
5963
|
+
}
|
|
5964
|
+
}
|
|
5965
|
+
qti-order-interaction::part(drag):focus:not(:active) {
|
|
5966
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5967
|
+
outline-offset: var(--qti-focus-offset);
|
|
5968
|
+
}
|
|
5969
|
+
|
|
5110
5970
|
qti-order-interaction qti-simple-choice:is(:state(placeholder), [data-state~='placeholder']) {
|
|
5111
5971
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
5112
|
-
shadow
|
|
5113
|
-
|
|
5114
|
-
with no specificity contest. The one thing
|
|
5115
|
-
|
|
5972
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
5973
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
5974
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
5975
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
5976
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
5116
5977
|
--drag-color: transparent;
|
|
5978
|
+
--qti-grip-color: transparent;
|
|
5117
5979
|
--drag-opacity: 1;
|
|
5118
5980
|
pointer-events: none;
|
|
5119
5981
|
}
|
|
5120
5982
|
|
|
5121
5983
|
qti-order-interaction qti-simple-choice:is(:state(dragging), [data-state~='dragging']) {
|
|
5122
5984
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
5123
|
-
shadow
|
|
5124
|
-
|
|
5125
|
-
with no specificity contest. The one thing
|
|
5126
|
-
|
|
5985
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
5986
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
5987
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
5988
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
5989
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
5127
5990
|
--drag-color: transparent;
|
|
5991
|
+
--qti-grip-color: transparent;
|
|
5128
5992
|
--drag-opacity: 1;
|
|
5129
5993
|
border-color: var(--qti-drop-highlight-border-color);
|
|
5130
5994
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
5131
|
-
color-mix(in
|
|
5995
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
5132
5996
|
pointer-events: none;
|
|
5133
5997
|
}
|
|
5134
5998
|
|
|
5135
5999
|
qti-order-interaction qti-simple-choice:is(:state(return-anchor), [data-state~='return-anchor']) {
|
|
5136
6000
|
border-color: var(--qti-drop-highlight-border-color);
|
|
5137
6001
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
5138
|
-
color-mix(in
|
|
5139
|
-
}
|
|
5140
|
-
|
|
5141
|
-
qti-order-interaction::part(hover),
|
|
5142
|
-
qti-order-interaction::part(active) {
|
|
5143
|
-
background-color: var(--qti-drop-highlight-bg);
|
|
6002
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
5144
6003
|
}
|
|
5145
6004
|
|
|
6005
|
+
qti-order-interaction::part(active),
|
|
5146
6006
|
qti-order-interaction::part(enabled) {
|
|
5147
6007
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
5148
6008
|
}
|
|
6009
|
+
|
|
6010
|
+
/* After `enabled`, which every target carries during a drag: the one under the chip. */
|
|
6011
|
+
qti-order-interaction::part(hover) {
|
|
6012
|
+
background-color: var(--qti-drop-highlight-bg);
|
|
6013
|
+
outline: var(--qti-drop-highlight-border-width) solid var(--qti-drop-highlight-border-color);
|
|
6014
|
+
outline-offset: var(--qti-focus-offset);
|
|
6015
|
+
}
|
|
5149
6016
|
}
|
|
5150
6017
|
|
|
5151
6018
|
@layer qti-components.interactions.corrections {
|
|
@@ -5171,20 +6038,35 @@
|
|
|
5171
6038
|
`[data-drag-clone]:state(candidate-*)` went with it and is deliberately NOT reproduced — a clone
|
|
5172
6039
|
carries no custom states at all, because cloneNode does not copy ElementInternals (measured), so
|
|
5173
6040
|
that selector never matched anything. */
|
|
5174
|
-
qti-order-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct'])
|
|
5175
|
-
|
|
6041
|
+
qti-order-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
6042
|
+
--drag-background-color: var(--qti-correct-light);
|
|
6043
|
+
--drag-color: var(--qti-correct);
|
|
6044
|
+
--drag-border-color: var(--qti-correct);
|
|
6045
|
+
--drag-box-shadow: none;
|
|
6046
|
+
--qti-grip-color: var(--qti-correct);
|
|
6047
|
+
}
|
|
6048
|
+
qti-order-interaction::part(drag):state(candidate-correct) {
|
|
5176
6049
|
--drag-background-color: var(--qti-correct-light);
|
|
5177
6050
|
--drag-color: var(--qti-correct);
|
|
5178
6051
|
--drag-border-color: var(--qti-correct);
|
|
5179
6052
|
--drag-box-shadow: none;
|
|
6053
|
+
--qti-grip-color: var(--qti-correct);
|
|
6054
|
+
}
|
|
6055
|
+
|
|
6056
|
+
qti-order-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
6057
|
+
--drag-background-color: var(--qti-incorrect-light);
|
|
6058
|
+
--drag-color: var(--qti-incorrect);
|
|
6059
|
+
--drag-border-color: var(--qti-incorrect);
|
|
6060
|
+
--drag-box-shadow: none;
|
|
6061
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
5180
6062
|
}
|
|
5181
6063
|
|
|
5182
|
-
qti-order-interaction
|
|
5183
|
-
qti-order-interaction::part(drag):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
6064
|
+
qti-order-interaction::part(drag):state(candidate-incorrect) {
|
|
5184
6065
|
--drag-background-color: var(--qti-incorrect-light);
|
|
5185
6066
|
--drag-color: var(--qti-incorrect);
|
|
5186
6067
|
--drag-border-color: var(--qti-incorrect);
|
|
5187
6068
|
--drag-box-shadow: none;
|
|
6069
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
5188
6070
|
}
|
|
5189
6071
|
|
|
5190
6072
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
@@ -5219,6 +6101,7 @@
|
|
|
5219
6101
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
5220
6102
|
box-sizing: border-box;
|
|
5221
6103
|
padding: var(--qti-drag-padding);
|
|
6104
|
+
line-height: var(--qti-field-line-height);
|
|
5222
6105
|
cursor: grab;
|
|
5223
6106
|
/*
|
|
5224
6107
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -5261,6 +6144,25 @@
|
|
|
5261
6144
|
color: var(--drag-color, var(--qti-component-color));
|
|
5262
6145
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
5263
6146
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
6147
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
6148
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
6149
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
6150
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
6151
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
6152
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
6153
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
6154
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
6155
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
6156
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
6157
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
6158
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
/* The bank chip's own ring. The rules below ring only the PLACED chip (::part(drag)), so a bank
|
|
6162
|
+
chip reached with Tab showed the browser's ring instead of the theme's. */
|
|
6163
|
+
qti-associate-interaction :is(:state(drag), [data-state~='drag']):focus:not(:is(:state(placeholder), [data-state~='placeholder']), :active) {
|
|
6164
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6165
|
+
outline-offset: var(--qti-focus-offset);
|
|
5264
6166
|
}
|
|
5265
6167
|
|
|
5266
6168
|
qti-associate-interaction :is(:state(drag), [data-state~='drag'])::part(control)::before,
|
|
@@ -5273,7 +6175,9 @@
|
|
|
5273
6175
|
width: 0.75em;
|
|
5274
6176
|
height: 1em;
|
|
5275
6177
|
margin-right: var(--qti-glyph-gap);
|
|
5276
|
-
|
|
6178
|
+
/* A verdict (`@mixin candidate`) sets --qti-grip-color, so a corrected chip's handle takes the
|
|
6179
|
+
verdict colour even when a brand colours its handles. */
|
|
6180
|
+
background-color: var(--qti-grip-color, var(--cito-color-drag-icon, currentColor));
|
|
5277
6181
|
mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
5278
6182
|
-webkit-mask: var(--qti-grip-mask) no-repeat center / contain;
|
|
5279
6183
|
}
|
|
@@ -5305,12 +6209,17 @@
|
|
|
5305
6209
|
qti-associate-interaction:is(:state(dragzone-enabled), [data-state~='dragzone-enabled']) slot[name='qti-simple-associable-choice'] {
|
|
5306
6210
|
background-color: var(--qti-bg-active);
|
|
5307
6211
|
}
|
|
5308
|
-
|
|
6212
|
+
/* A placed chip lives in a shadow root; `::part(drag)` is the only way in. This used to be
|
|
6213
|
+
`::part(qti-simple-associable-choice)`, a part named after the tag. Its hover and ring
|
|
6214
|
+
are in the states layer below. Deleted here: `&[dragging] { @mixin dragging }`. An attribute
|
|
6215
|
+
selector after ::part() never matches. */
|
|
6216
|
+
qti-associate-interaction qti-simple-associable-choice::part(drag) {
|
|
5309
6217
|
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
5310
6218
|
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
5311
6219
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
5312
6220
|
box-sizing: border-box;
|
|
5313
6221
|
padding: var(--qti-drag-padding);
|
|
6222
|
+
line-height: var(--qti-field-line-height);
|
|
5314
6223
|
cursor: grab;
|
|
5315
6224
|
/*
|
|
5316
6225
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -5353,34 +6262,27 @@
|
|
|
5353
6262
|
color: var(--drag-color, var(--qti-component-color));
|
|
5354
6263
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
5355
6264
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
6265
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
6266
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
6267
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
6268
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
6269
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
6270
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
6271
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
6272
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
6273
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
6274
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
6275
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
6276
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
5356
6277
|
}
|
|
5357
|
-
|
|
5358
|
-
:is(qti-associate-interaction qti-simple-associable-choice::part(drag),qti-associate-interaction::part(drag)):hover {
|
|
5359
|
-
background-color: color-mix(
|
|
5360
|
-
in srgb,
|
|
5361
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
5362
|
-
black
|
|
5363
|
-
);
|
|
5364
|
-
}
|
|
5365
|
-
}
|
|
5366
|
-
:is(qti-associate-interaction qti-simple-associable-choice::part(drag),qti-associate-interaction::part(drag)):focus {
|
|
5367
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
5368
|
-
}
|
|
5369
|
-
[dragging]:is(qti-associate-interaction qti-simple-associable-choice::part(drag),qti-associate-interaction::part(drag)) {
|
|
5370
|
-
pointer-events: none;
|
|
5371
|
-
rotate: -2deg;
|
|
5372
|
-
--drag-box-shadow: 0 8px 12px rgb(0 0 0 / 20%), 0 4px 8px rgb(0 0 0 / 10%);
|
|
5373
|
-
}
|
|
5374
|
-
/* Editor fake-drag projected into the interaction's drop-target shadow.
|
|
5375
|
-
Kept as a separate block (not merged into the comma list above)
|
|
5376
|
-
because a CSS comment between commas in a nested selector list is
|
|
5377
|
-
silently dropped by Chrome's nesting parser. */
|
|
6278
|
+
/* Editor fake-drag projected into the interaction's drop-target shadow. */
|
|
5378
6279
|
qti-associate-interaction::part(drag) {
|
|
5379
6280
|
/* Structural — the load-bearing box, never state-switched (layout-invariance contract).
|
|
5380
6281
|
box-sizing is deliberate: the clone is appended to document.body outside reset.css's
|
|
5381
6282
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
5382
6283
|
box-sizing: border-box;
|
|
5383
6284
|
padding: var(--qti-drag-padding);
|
|
6285
|
+
line-height: var(--qti-field-line-height);
|
|
5384
6286
|
cursor: grab;
|
|
5385
6287
|
/*
|
|
5386
6288
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -5423,19 +6325,19 @@
|
|
|
5423
6325
|
color: var(--drag-color, var(--qti-component-color));
|
|
5424
6326
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
5425
6327
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
6328
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
6329
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
6330
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
6331
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
6332
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
6333
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
6334
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
6335
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
6336
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
6337
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
6338
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
6339
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
5426
6340
|
}
|
|
5427
|
-
@media (hover: hover) {
|
|
5428
|
-
:is(qti-associate-interaction::part(drag)):hover {
|
|
5429
|
-
background-color: color-mix(
|
|
5430
|
-
in srgb,
|
|
5431
|
-
var(--drag-background-color, var(--qti-component-background-color)) 92%,
|
|
5432
|
-
black
|
|
5433
|
-
);
|
|
5434
|
-
}
|
|
5435
|
-
}
|
|
5436
|
-
:is(qti-associate-interaction::part(drag)):focus {
|
|
5437
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
5438
|
-
}
|
|
5439
6341
|
/* `display: grid` lives in qti-associate-interaction.styles.ts, which already declares it on
|
|
5440
6342
|
[part~='drop'] alongside the drop's min-height/min-width. */
|
|
5441
6343
|
/* A filled drop hides its dashed edge — see the note in qti-gap-match-interaction.css. Every
|
|
@@ -5459,7 +6361,8 @@
|
|
|
5459
6361
|
border-style: var(--drop-border-style, dashed);
|
|
5460
6362
|
}
|
|
5461
6363
|
qti-associate-interaction::part(drop):focus {
|
|
5462
|
-
|
|
6364
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6365
|
+
outline-offset: var(--qti-focus-offset);
|
|
5463
6366
|
}
|
|
5464
6367
|
|
|
5465
6368
|
/*
|
|
@@ -5490,6 +6393,7 @@
|
|
|
5490
6393
|
@scope, so it inherits no border-box from anywhere else and this sets it. */
|
|
5491
6394
|
box-sizing: border-box;
|
|
5492
6395
|
padding: var(--qti-drag-padding);
|
|
6396
|
+
line-height: var(--qti-field-line-height);
|
|
5493
6397
|
cursor: grab;
|
|
5494
6398
|
/*
|
|
5495
6399
|
* A chip is as wide as the drop it belongs in — the SAME token the drop reserves with.
|
|
@@ -5532,24 +6436,59 @@
|
|
|
5532
6436
|
color: var(--drag-color, var(--qti-component-color));
|
|
5533
6437
|
opacity: var(--drag-opacity, var(--qti-component-opacity));
|
|
5534
6438
|
filter: var(--drag-filter, var(--qti-component-filter));
|
|
6439
|
+
/* A chip is a selector, so it takes the selector radius, and its lift follows --cito-depth. Both
|
|
6440
|
+
re-declared with the slot in FRONT, the drop's dashed-edge pattern: the default changes, the
|
|
6441
|
+
slot still wins, and nothing is set on --drag-* (see above). */
|
|
6442
|
+
border-radius: var(--drag-border-radius, var(--qti-radius-selector));
|
|
6443
|
+
box-shadow: var(--drag-box-shadow, var(--qti-drag-lift));
|
|
6444
|
+
/* The chip's own colours (--cito-color-chip), behind the same slots: the surface and the
|
|
6445
|
+
surrounding text by default, a filled chip when a brand sets the tier-1 chip colour. */
|
|
6446
|
+
background-color: var(--drag-background-color, var(--qti-drag-fill));
|
|
6447
|
+
/* A brand can give a chip its own edge (--cito-color-chip-border), transparent for a borderless
|
|
6448
|
+
card; the width stays, so a chip keeps its size whichever edge it shows. */
|
|
6449
|
+
border-color: var(--drag-border-color, var(--cito-color-chip-border, var(--qti-component-border-color)));
|
|
6450
|
+
color: var(--drag-color, var(--cito-color-chip-content, inherit));
|
|
5535
6451
|
}
|
|
5536
6452
|
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
6453
|
+
/*
|
|
6454
|
+
* A placed chip's hover and focus ring. Written flat: nested under `&::part(drag)` they
|
|
6455
|
+
* compiled to `:is(…::part(drag)):hover`, and a pseudo-element cannot sit inside `:is()`, so none
|
|
6456
|
+
* of them ever matched. In this layer, after the chip rule, because `@mixin drag` sets
|
|
6457
|
+
* `background-color` and must not out-rank the hover.
|
|
6458
|
+
*/
|
|
6459
|
+
@media (hover: hover) and (pointer: fine) {
|
|
6460
|
+
qti-associate-interaction qti-simple-associable-choice::part(drag):hover,
|
|
6461
|
+
qti-associate-interaction::part(drag):hover {
|
|
6462
|
+
--drag-border-color: var(--qti-border-active);
|
|
6463
|
+
}
|
|
6464
|
+
}
|
|
6465
|
+
qti-associate-interaction qti-simple-associable-choice::part(drag):focus:not(:active),
|
|
6466
|
+
qti-associate-interaction::part(drag):focus:not(:active) {
|
|
6467
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6468
|
+
outline-offset: var(--qti-focus-offset);
|
|
5540
6469
|
}
|
|
5541
6470
|
|
|
6471
|
+
qti-associate-interaction::part(active),
|
|
5542
6472
|
qti-associate-interaction::part(enabled) {
|
|
5543
6473
|
background-color: var(--qti-drop-highlight-enabled-bg);
|
|
5544
6474
|
}
|
|
5545
6475
|
|
|
6476
|
+
/* After `enabled`, which every target carries during a drag: the one under the chip. */
|
|
6477
|
+
qti-associate-interaction::part(hover) {
|
|
6478
|
+
background-color: var(--qti-drop-highlight-bg);
|
|
6479
|
+
outline: var(--qti-drop-highlight-border-width) solid var(--qti-drop-highlight-border-color);
|
|
6480
|
+
outline-offset: var(--qti-focus-offset);
|
|
6481
|
+
}
|
|
6482
|
+
|
|
5546
6483
|
qti-associate-interaction qti-simple-associable-choice:is(:state(placeholder), [data-state~='placeholder']) {
|
|
5547
6484
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
5548
|
-
shadow
|
|
5549
|
-
|
|
5550
|
-
with no specificity contest. The one thing
|
|
5551
|
-
|
|
6485
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
6486
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
6487
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
6488
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
6489
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
5552
6490
|
--drag-color: transparent;
|
|
6491
|
+
--qti-grip-color: transparent;
|
|
5553
6492
|
--drag-opacity: 1;
|
|
5554
6493
|
border-color: transparent;
|
|
5555
6494
|
pointer-events: none;
|
|
@@ -5557,15 +6496,17 @@
|
|
|
5557
6496
|
|
|
5558
6497
|
qti-associate-interaction qti-simple-associable-choice:is(:state(dragging), [data-state~='dragging']) {
|
|
5559
6498
|
/* The hole a spent/lifted chip leaves. Like the chip (see `drag`), it sets NO fill / border /
|
|
5560
|
-
shadow
|
|
5561
|
-
|
|
5562
|
-
with no specificity contest. The one thing
|
|
5563
|
-
|
|
6499
|
+
shadow here, on the interaction's high-specificity selector: the hole's paint is the bare
|
|
6500
|
+
`:state(placeholder)` rule in interactions/qti-placeholder.css (a primary tint, inset shadow),
|
|
6501
|
+
which a brand can restyle with the same selector and no specificity contest. The one thing this
|
|
6502
|
+
mixin does, in every brand, is hide what the chip shows: its text, and its handle, which a theme
|
|
6503
|
+
that colours its handles (--cito-color-drag-icon) would otherwise leave standing in the hole. */
|
|
5564
6504
|
--drag-color: transparent;
|
|
6505
|
+
--qti-grip-color: transparent;
|
|
5565
6506
|
--drag-opacity: 1;
|
|
5566
6507
|
border-color: var(--qti-drop-highlight-border-color);
|
|
5567
6508
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
5568
|
-
color-mix(in
|
|
6509
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
5569
6510
|
pointer-events: none;
|
|
5570
6511
|
}
|
|
5571
6512
|
|
|
@@ -5582,7 +6523,7 @@
|
|
|
5582
6523
|
qti-associate-interaction qti-simple-associable-choice:is(:state(return-anchor), [data-state~='return-anchor']) {
|
|
5583
6524
|
border-color: var(--qti-drop-highlight-border-color);
|
|
5584
6525
|
box-shadow: inset 0 0 0 var(--qti-drop-highlight-border-width, 2px)
|
|
5585
|
-
color-mix(in
|
|
6526
|
+
color-mix(in oklab, var(--qti-drop-highlight-border-color) 55%, transparent);
|
|
5586
6527
|
}
|
|
5587
6528
|
}
|
|
5588
6529
|
|
|
@@ -5593,22 +6534,37 @@
|
|
|
5593
6534
|
`[data-drag-clone]:state(candidate-*)` went with it and is deliberately NOT reproduced — a clone
|
|
5594
6535
|
carries no custom states at all, because cloneNode does not copy ElementInternals (measured), so
|
|
5595
6536
|
that selector never matched anything. */
|
|
5596
|
-
qti-associate-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct'])
|
|
5597
|
-
|
|
5598
|
-
|
|
6537
|
+
qti-associate-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
6538
|
+
--drag-background-color: var(--qti-correct-light);
|
|
6539
|
+
--drag-color: var(--qti-correct);
|
|
6540
|
+
--drag-border-color: var(--qti-correct);
|
|
6541
|
+
--drag-box-shadow: none;
|
|
6542
|
+
--qti-grip-color: var(--qti-correct);
|
|
6543
|
+
}
|
|
6544
|
+
qti-simple-associable-choice::part(drag):state(candidate-correct),
|
|
6545
|
+
qti-associate-interaction::part(drag):state(candidate-correct) {
|
|
5599
6546
|
--drag-background-color: var(--qti-correct-light);
|
|
5600
6547
|
--drag-color: var(--qti-correct);
|
|
5601
6548
|
--drag-border-color: var(--qti-correct);
|
|
5602
6549
|
--drag-box-shadow: none;
|
|
6550
|
+
--qti-grip-color: var(--qti-correct);
|
|
5603
6551
|
}
|
|
5604
6552
|
|
|
5605
|
-
qti-associate-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect'])
|
|
5606
|
-
qti-simple-associable-choice::part(drag):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']),
|
|
5607
|
-
qti-associate-interaction::part(drag):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
6553
|
+
qti-associate-interaction :is(:state(drag), [data-state~='drag']):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
5608
6554
|
--drag-background-color: var(--qti-incorrect-light);
|
|
5609
6555
|
--drag-color: var(--qti-incorrect);
|
|
5610
6556
|
--drag-border-color: var(--qti-incorrect);
|
|
5611
6557
|
--drag-box-shadow: none;
|
|
6558
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
6559
|
+
}
|
|
6560
|
+
|
|
6561
|
+
qti-simple-associable-choice::part(drag):state(candidate-incorrect),
|
|
6562
|
+
qti-associate-interaction::part(drag):state(candidate-incorrect) {
|
|
6563
|
+
--drag-background-color: var(--qti-incorrect-light);
|
|
6564
|
+
--drag-color: var(--qti-incorrect);
|
|
6565
|
+
--drag-border-color: var(--qti-incorrect);
|
|
6566
|
+
--drag-box-shadow: none;
|
|
6567
|
+
--qti-grip-color: var(--qti-incorrect);
|
|
5612
6568
|
}
|
|
5613
6569
|
|
|
5614
6570
|
/* The bank is hidden by the interaction itself, on :host([answer-key]) — see
|
|
@@ -5619,7 +6575,7 @@
|
|
|
5619
6575
|
qti-graphic-order-interaction {
|
|
5620
6576
|
--qti-graphic-order-pin-size: calc(var(--qti-select-point-marker-size, 1.5rem) * 1.2);
|
|
5621
6577
|
--qti-graphic-order-pin-anchor: -100%;
|
|
5622
|
-
--qti-graphic-order-pin-fill: var(--qti-
|
|
6578
|
+
--qti-graphic-order-pin-fill: var(--qti-bg);
|
|
5623
6579
|
--qti-graphic-order-pin-number-size: calc(var(--qti-graphic-order-pin-size) * 0.5);
|
|
5624
6580
|
--qti-graphic-order-pin-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M192 500C145 434 106 386 77 344C49 305 32 272 32 224C32 135.6 103.6 64 192 64s160 71.6 160 160c0 48-17 81-45 120c-29 42-68 90-115 156z' fill='white' stroke='currentColor' stroke-width='28' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
5625
6581
|
}
|
|
@@ -5627,7 +6583,7 @@
|
|
|
5627
6583
|
qti-graphic-order-interaction qti-hotspot-choice {
|
|
5628
6584
|
width: 100%;
|
|
5629
6585
|
height: 100%;
|
|
5630
|
-
background-color: color-mix(in
|
|
6586
|
+
background-color: color-mix(in oklab, var(--qti-border-color) 18%, transparent);
|
|
5631
6587
|
padding: 0;
|
|
5632
6588
|
cursor: pointer;
|
|
5633
6589
|
transition:
|
|
@@ -5641,36 +6597,36 @@
|
|
|
5641
6597
|
}
|
|
5642
6598
|
|
|
5643
6599
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice) {
|
|
5644
|
-
background-color: color-mix(in
|
|
6600
|
+
background-color: color-mix(in oklab, var(--qti-border-color) 18%, transparent);
|
|
5645
6601
|
box-shadow: none;
|
|
5646
6602
|
}
|
|
5647
6603
|
|
|
5648
6604
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):hover,[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):hover,[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):hover {
|
|
5649
|
-
background-color: color-mix(in
|
|
6605
|
+
background-color: color-mix(in oklab, var(--qti-border-active) 12%, transparent);
|
|
5650
6606
|
}
|
|
5651
6607
|
|
|
5652
6608
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):hover {
|
|
5653
|
-
background-color: color-mix(in
|
|
6609
|
+
background-color: color-mix(in oklab, var(--qti-border-active) 20%, transparent);
|
|
5654
6610
|
box-shadow: none;
|
|
5655
6611
|
}
|
|
5656
6612
|
|
|
5657
|
-
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):focus
|
|
6613
|
+
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):focus,[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):focus,[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):focus {
|
|
5658
6614
|
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5659
|
-
outline-offset:
|
|
6615
|
+
outline-offset: var(--qti-focus-offset);
|
|
5660
6616
|
}
|
|
5661
6617
|
|
|
5662
|
-
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):focus
|
|
6618
|
+
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):focus {
|
|
5663
6619
|
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
5664
|
-
outline-offset:
|
|
6620
|
+
outline-offset: var(--qti-focus-offset);
|
|
5665
6621
|
}
|
|
5666
6622
|
|
|
5667
6623
|
[aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice) {
|
|
5668
6624
|
border: 0 !important;
|
|
5669
6625
|
box-shadow: none;
|
|
5670
|
-
background-color: color-mix(in
|
|
6626
|
+
background-color: color-mix(in oklab, var(--qti-selected-bg) 35%, transparent);
|
|
5671
6627
|
}
|
|
5672
6628
|
|
|
5673
|
-
[aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice):hover,[aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice):focus
|
|
6629
|
+
[aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice):hover,[aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice):focus {
|
|
5674
6630
|
border-color: transparent !important;
|
|
5675
6631
|
}
|
|
5676
6632
|
[aria-ordercorrectvalue][aria-ordervalue]:is(qti-graphic-order-interaction qti-hotspot-choice):not([shape='circle'])::after {
|
|
@@ -5715,11 +6671,11 @@
|
|
|
5715
6671
|
}
|
|
5716
6672
|
|
|
5717
6673
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(checked), [data-state~='checked']),[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(checked), [data-state~='checked']),[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(checked), [data-state~='checked']) {
|
|
5718
|
-
background-color: color-mix(in
|
|
6674
|
+
background-color: color-mix(in oklab, var(--qti-selected-bg) 35%, transparent);
|
|
5719
6675
|
}
|
|
5720
6676
|
|
|
5721
6677
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(checked), [data-state~='checked']) {
|
|
5722
|
-
background-color: color-mix(in
|
|
6678
|
+
background-color: color-mix(in oklab, var(--qti-selected-bg) 40%, transparent);
|
|
5723
6679
|
box-shadow: none;
|
|
5724
6680
|
}
|
|
5725
6681
|
|
|
@@ -5746,29 +6702,29 @@
|
|
|
5746
6702
|
|
|
5747
6703
|
@layer qti-components.interactions.corrections {
|
|
5748
6704
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']),[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']),[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']) {
|
|
5749
|
-
background-color: color-mix(in
|
|
6705
|
+
background-color: color-mix(in oklab, var(--qti-answer-bg) 75%, transparent);
|
|
5750
6706
|
}
|
|
5751
6707
|
|
|
5752
6708
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(correct-response), [data-state~='correct-response']) {
|
|
5753
|
-
background-color: color-mix(in
|
|
6709
|
+
background-color: color-mix(in oklab, var(--qti-answer-bg) 80%, transparent);
|
|
5754
6710
|
box-shadow: none;
|
|
5755
6711
|
}
|
|
5756
6712
|
|
|
5757
6713
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-correct), [data-state~='candidate-correct']),[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-correct), [data-state~='candidate-correct']),[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
5758
|
-
background-color: color-mix(in
|
|
6714
|
+
background-color: color-mix(in oklab, var(--qti-correct) 35%, transparent);
|
|
5759
6715
|
}
|
|
5760
6716
|
|
|
5761
6717
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-correct), [data-state~='candidate-correct']) {
|
|
5762
|
-
background-color: color-mix(in
|
|
6718
|
+
background-color: color-mix(in oklab, var(--qti-correct) 40%, transparent);
|
|
5763
6719
|
box-shadow: none;
|
|
5764
6720
|
}
|
|
5765
6721
|
|
|
5766
6722
|
[shape='circle']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']),[shape='rect']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']),[shape='ellipse']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
5767
|
-
background-color: color-mix(in
|
|
6723
|
+
background-color: color-mix(in oklab, var(--qti-incorrect) 35%, transparent);
|
|
5768
6724
|
}
|
|
5769
6725
|
|
|
5770
6726
|
[shape='poly']:is(qti-graphic-order-interaction qti-hotspot-choice):is(:state(candidate-incorrect), [data-state~='candidate-incorrect']) {
|
|
5771
|
-
background-color: color-mix(in
|
|
6727
|
+
background-color: color-mix(in oklab, var(--qti-incorrect) 40%, transparent);
|
|
5772
6728
|
box-shadow: none;
|
|
5773
6729
|
}
|
|
5774
6730
|
|
|
@@ -5791,13 +6747,12 @@
|
|
|
5791
6747
|
background-color: transparent;
|
|
5792
6748
|
}
|
|
5793
6749
|
[shape='circle']:is(qti-graphic-associate-interaction qti-associable-hotspot):focus {
|
|
5794
|
-
|
|
6750
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6751
|
+
outline-offset: var(--qti-focus-offset);
|
|
5795
6752
|
}
|
|
5796
6753
|
}
|
|
5797
6754
|
|
|
5798
6755
|
@layer qti-components.interactions.states {
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
6756
|
/* No qti-selections-light / -dark here. Appendix B.1 of the QTI 3 implementation guide defines
|
|
5802
6757
|
that class pair for qti-hotspot-interaction and qti-graphic-gap-match-interaction only, and no
|
|
5803
6758
|
item in this repo ever set it on a graphic-associate interaction. What was here overrode the neutral
|
|
@@ -5816,10 +6771,22 @@
|
|
|
5816
6771
|
}
|
|
5817
6772
|
|
|
5818
6773
|
@layer qti-components.interactions.base{
|
|
6774
|
+
|
|
5819
6775
|
qti-slider-interaction {
|
|
5820
|
-
--qti-tick-color:
|
|
6776
|
+
--qti-tick-color: var(--qti-color-base-300);
|
|
5821
6777
|
--qti-tick-width: 1px;
|
|
5822
6778
|
}
|
|
6779
|
+
|
|
6780
|
+
/* The slider takes focus on its host (tabindex 0, role slider); the ring goes round the knob, the
|
|
6781
|
+
part you move, on :focus like every control you set with the pointer. */
|
|
6782
|
+
qti-slider-interaction:focus {
|
|
6783
|
+
outline: var(--qti-focus-border-width) solid transparent;
|
|
6784
|
+
}
|
|
6785
|
+
|
|
6786
|
+
qti-slider-interaction:focus::part(knob) {
|
|
6787
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6788
|
+
outline-offset: var(--qti-focus-offset);
|
|
6789
|
+
}
|
|
5823
6790
|
}
|
|
5824
6791
|
|
|
5825
6792
|
@layer qti-components.interactions.base {
|
|
@@ -5836,12 +6803,20 @@ qti-slider-interaction {
|
|
|
5836
6803
|
* corrections mixin writes to. Setting it here rather than `color` leaves the prompt inheriting
|
|
5837
6804
|
* ordinary body text, and corrections still win: they set the same variable on the point element
|
|
5838
6805
|
* itself (`[part~='correct']`), which is deeper than this host declaration.
|
|
6806
|
+
*
|
|
6807
|
+
* A theme sets it through the optional input --cito-color-marker (the primary by default), and
|
|
6808
|
+
* the marker's shape through --cito-icon-marker. The halo round it follows the colour on its own
|
|
6809
|
+
* (qti-select-point-interaction.styles.ts).
|
|
5839
6810
|
*/
|
|
5840
|
-
--qti-select-point-marker-color: var(--qti-primary);
|
|
6811
|
+
--qti-select-point-marker-color: var(--cito-color-marker, var(--qti-primary));
|
|
6812
|
+
|
|
6813
|
+
/* One selector, not nested under `&::part(point)`: that compiled to `:is(…::part(point))`,
|
|
6814
|
+
which no browser accepts, so the ring never matched. */
|
|
5841
6815
|
}
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
6816
|
+
qti-select-point-interaction::part(point):focus {
|
|
6817
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6818
|
+
outline-offset: var(--qti-focus-offset);
|
|
6819
|
+
}
|
|
5845
6820
|
}
|
|
5846
6821
|
|
|
5847
6822
|
@layer qti-components.interactions.corrections {
|
|
@@ -5863,7 +6838,214 @@ qti-slider-interaction {
|
|
|
5863
6838
|
}
|
|
5864
6839
|
|
|
5865
6840
|
@layer qti-components.interactions.base{
|
|
6841
|
+
/* End attempt is one button, drawn as a test control (`@mixin test-button`). Flat: a pseudo-class
|
|
6842
|
+
after ::part() in a nested list compiles to a dead `:is()`. */
|
|
6843
|
+
qti-end-attempt-interaction::part(button) {
|
|
6844
|
+
min-block-size: var(--test-button-size, 2.25rem);
|
|
6845
|
+
padding: 0 0.875rem;
|
|
6846
|
+
font: inherit;
|
|
6847
|
+
line-height: 1.25;
|
|
6848
|
+
cursor: pointer;
|
|
6849
|
+
border-radius: var(--test-button-border-radius, var(--qti-radius-field));
|
|
6850
|
+
background-color: var(--test-button-background-color, var(--qti-color-base-100));
|
|
6851
|
+
color: var(--test-button-color, var(--qti-color-base-content));
|
|
6852
|
+
border: var(--qti-border-width) solid var(--test-button-border-color, var(--qti-border-color));
|
|
6853
|
+
}
|
|
6854
|
+
@media (hover: hover) and (pointer: fine) {
|
|
6855
|
+
|
|
6856
|
+
qti-end-attempt-interaction::part(button):hover {
|
|
6857
|
+
background-color: var(
|
|
6858
|
+
--test-button-hover-background-color,
|
|
6859
|
+
color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) var(--qti-hover-mix))
|
|
6860
|
+
);
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
qti-end-attempt-interaction::part(button):active {
|
|
6865
|
+
background-color: var(
|
|
6866
|
+
--test-button-active-background-color,
|
|
6867
|
+
color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) var(--qti-active-mix))
|
|
6868
|
+
);
|
|
6869
|
+
}
|
|
6870
|
+
|
|
6871
|
+
qti-end-attempt-interaction::part(button):focus-visible {
|
|
6872
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6873
|
+
outline-offset: var(--qti-focus-offset);
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6876
|
+
qti-end-attempt-interaction::part(button):disabled {
|
|
6877
|
+
cursor: not-allowed;
|
|
6878
|
+
color: var(--qti-color-disabled);
|
|
6879
|
+
border-color: var(--qti-color-disabled);
|
|
6880
|
+
}
|
|
6881
|
+
}
|
|
6882
|
+
|
|
6883
|
+
@layer qti-components.interactions.base{
|
|
6884
|
+
/* The file input: its button drawn as a test control (`@mixin test-button`), the file name beside it
|
|
6885
|
+
in the item's own type. Flat: a pseudo-element after ::part() in a nested list compiles to a dead
|
|
6886
|
+
`:is()`. */
|
|
6887
|
+
qti-upload-interaction::part(input) {
|
|
6888
|
+
font: inherit;
|
|
6889
|
+
color: var(--qti-color-base-content);
|
|
6890
|
+
}
|
|
6891
|
+
|
|
6892
|
+
qti-upload-interaction::part(input)::file-selector-button {
|
|
6893
|
+
min-block-size: var(--test-button-size, 2.25rem);
|
|
6894
|
+
padding: 0 0.875rem;
|
|
6895
|
+
font: inherit;
|
|
6896
|
+
line-height: 1.25;
|
|
6897
|
+
cursor: pointer;
|
|
6898
|
+
border-radius: var(--test-button-border-radius, var(--qti-radius-field));
|
|
6899
|
+
background-color: var(--test-button-background-color, var(--qti-color-base-100));
|
|
6900
|
+
color: var(--test-button-color, var(--qti-color-base-content));
|
|
6901
|
+
border: var(--qti-border-width) solid var(--test-button-border-color, var(--qti-border-color));
|
|
6902
|
+
margin-inline-end: var(--qti-spacing);
|
|
6903
|
+
}
|
|
6904
|
+
@media (hover: hover) and (pointer: fine) {
|
|
6905
|
+
|
|
6906
|
+
qti-upload-interaction::part(input):hover::file-selector-button {
|
|
6907
|
+
background-color: var(
|
|
6908
|
+
--test-button-hover-background-color,
|
|
6909
|
+
color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) var(--qti-hover-mix))
|
|
6910
|
+
);
|
|
6911
|
+
}
|
|
6912
|
+
}
|
|
6913
|
+
|
|
6914
|
+
qti-upload-interaction::part(input):active::file-selector-button {
|
|
6915
|
+
background-color: var(
|
|
6916
|
+
--test-button-active-background-color,
|
|
6917
|
+
color-mix(in oklab, var(--qti-color-base-100), var(--qti-color-base-content) var(--qti-active-mix))
|
|
6918
|
+
);
|
|
6919
|
+
}
|
|
6920
|
+
|
|
6921
|
+
qti-upload-interaction::part(input):focus-visible {
|
|
6922
|
+
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
6923
|
+
outline-offset: var(--qti-focus-offset);
|
|
6924
|
+
}
|
|
6925
|
+
|
|
6926
|
+
qti-upload-interaction::part(input):disabled::file-selector-button {
|
|
6927
|
+
cursor: not-allowed;
|
|
6928
|
+
color: var(--qti-color-disabled);
|
|
6929
|
+
border-color: var(--qti-color-disabled);
|
|
6930
|
+
}
|
|
6931
|
+
}
|
|
6932
|
+
|
|
6933
|
+
@layer qti-components.interactions.base{
|
|
6934
|
+
|
|
5866
6935
|
/* `display: block` lives in qti-prompt.styles.ts, which already declares it on :host. */
|
|
6936
|
+
|
|
6937
|
+
/* A prompt opens the interaction it belongs to, so it carries no space above itself. Otherwise the
|
|
6938
|
+
interaction starts lower than whatever sits beside it, and columns do not line up at the top. */
|
|
6939
|
+
@layer qti-components.interactions.base {
|
|
6940
|
+
qti-prompt {
|
|
6941
|
+
margin-block-start: 0;
|
|
6942
|
+
}
|
|
6943
|
+
}
|
|
6944
|
+
}
|
|
6945
|
+
|
|
6946
|
+
@layer qti-components.interactions.states{
|
|
6947
|
+
/*
|
|
6948
|
+
* The hole a lifted or spent chip leaves, in every drag-and-drop interaction: a tint of the primary
|
|
6949
|
+
* colour, no border, and an inset shadow, so it reads as a slot the chip came out of rather than as
|
|
6950
|
+
* a chip without its label. Both colours are tier 2, derived from the primary (qti-variables.css).
|
|
6951
|
+
*
|
|
6952
|
+
* A bare `:state(placeholder)` on purpose, imported into `interactions.states`. The layer puts it
|
|
6953
|
+
* above a brand's resting chip (`interactions.brand`), so a filled chip still leaves a tinted hole;
|
|
6954
|
+
* the low specificity lets a brand sheet restyle the hole with the same selector, no contest. Each
|
|
6955
|
+
* interaction's own placeholder rule (`@mixin drag-placeholder`) only hides the text and the handle, so it does not
|
|
6956
|
+
* fight this one. Graphic gap match reads no --drag-* slot, so its tiles keep their own placeholder.
|
|
6957
|
+
* Corrections, a layer higher, still win.
|
|
6958
|
+
*/
|
|
6959
|
+
:is(:state(placeholder), [data-state~='placeholder']) {
|
|
6960
|
+
--drag-background-color: var(--qti-placeholder-bg);
|
|
6961
|
+
--drag-border-color: transparent;
|
|
6962
|
+
--drag-box-shadow: inset var(--qti-placeholder-shadow);
|
|
6963
|
+
}
|
|
6964
|
+
}
|
|
6965
|
+
|
|
6966
|
+
@layer qti-components.interactions.states{
|
|
6967
|
+
/*
|
|
6968
|
+
* The chip in flight: the clone the drag code builds at pointer-down and moves with the pointer
|
|
6969
|
+
* (`[data-drag-clone]`, drag-drop-core.mixin.ts). Opaque, the chip as it is, raised off the page by
|
|
6970
|
+
* --qti-drag-elevation, which a theme sets with --cito-shadow-drag.
|
|
6971
|
+
*
|
|
6972
|
+
* Through the paint slot, so it composes with each interaction's `@mixin drag` on the clone. In
|
|
6973
|
+
* `interactions.states`, above the resting chip's lift. A graphic-gap-match image tile reads no
|
|
6974
|
+
* --drag-* slot and stays as it is: a picture.
|
|
6975
|
+
*/
|
|
6976
|
+
[data-drag-clone] {
|
|
6977
|
+
--drag-box-shadow: var(--qti-drag-elevation);
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6980
|
+
/*
|
|
6981
|
+
* While a chip is in flight, the others do not answer the pointer. The clone takes no pointer
|
|
6982
|
+
* events, so the chips it passes over match :hover, and their hover edge (`@mixin drag-hover`) lit
|
|
6983
|
+
* up under a drag that was not about them. `initial` makes the slot guaranteed-invalid, so the
|
|
6984
|
+
* edge falls back to its resting colour, whatever the theme made that. Not on a placeholder, which
|
|
6985
|
+
* keeps its own transparent edge. The drop the chip is over shows `@mixin drop-over` instead.
|
|
6986
|
+
*/
|
|
6987
|
+
:is(:state(dragzone-active), [data-state~='dragzone-active']) :is(:state(drag), [data-state~='drag']):hover:not(:is(:state(placeholder), [data-state~='placeholder'])),
|
|
6988
|
+
:is(:state(dragzone-active), [data-state~='dragzone-active'])::part(drag):hover,
|
|
6989
|
+
:is(:state(dragzone-active), [data-state~='dragzone-active']) ::part(drag):hover {
|
|
6990
|
+
--drag-border-color: initial;
|
|
6991
|
+
}
|
|
6992
|
+
}
|
|
6993
|
+
|
|
6994
|
+
@layer qti-components.interactions.states{
|
|
6995
|
+
/*
|
|
6996
|
+
* A disabled interaction, or one disabled choice in it, is drawn in one muted grey: its text, its
|
|
6997
|
+
* edges, its controls and the mark of what is selected (--qti-color-disabled). Not opacity: that
|
|
6998
|
+
* faded everything equally, the selected answer too, let the background show through boxes and
|
|
6999
|
+
* chips, and could not be themed. The box does not move; only colours change.
|
|
7000
|
+
*
|
|
7001
|
+
* It works by re-valuing, on the disabled element, the tokens its paint reads, the same way a
|
|
7002
|
+
* [data-qti-theme] subtree re-themes; nothing per interaction has to know about it.
|
|
7003
|
+
*
|
|
7004
|
+
* Readonly is not disabled. A readonly interaction (an answered test in review) keeps its full look,
|
|
7005
|
+
* so the answers stay readable; only its cursor changes.
|
|
7006
|
+
*
|
|
7007
|
+
* Imported into `interactions.states`, so a disabled correction (corrections, a layer higher) still
|
|
7008
|
+
* shows its verdict colours.
|
|
7009
|
+
*/
|
|
7010
|
+
:is(
|
|
7011
|
+
qti-choice-interaction,
|
|
7012
|
+
qti-hottext-interaction,
|
|
7013
|
+
qti-inline-choice-interaction,
|
|
7014
|
+
qti-text-entry-interaction,
|
|
7015
|
+
qti-extended-text-interaction,
|
|
7016
|
+
qti-gap-match-interaction,
|
|
7017
|
+
qti-order-interaction,
|
|
7018
|
+
qti-associate-interaction,
|
|
7019
|
+
qti-match-interaction,
|
|
7020
|
+
qti-hotspot-interaction,
|
|
7021
|
+
qti-graphic-order-interaction,
|
|
7022
|
+
qti-graphic-associate-interaction,
|
|
7023
|
+
qti-graphic-gap-match-interaction,
|
|
7024
|
+
qti-select-point-interaction,
|
|
7025
|
+
qti-slider-interaction
|
|
7026
|
+
)[disabled],
|
|
7027
|
+
:is(:state(disabled), [data-state~='disabled']) {
|
|
7028
|
+
color: var(--qti-color-disabled);
|
|
7029
|
+
--qti-fg: var(--qti-color-disabled);
|
|
7030
|
+
--qti-component-color: var(--qti-color-disabled);
|
|
7031
|
+
--qti-border-color: var(--qti-color-disabled);
|
|
7032
|
+
--qti-component-border-color: var(--qti-color-disabled);
|
|
7033
|
+
--qti-border-active: var(--qti-color-disabled);
|
|
7034
|
+
--qti-border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-color-disabled);
|
|
7035
|
+
|
|
7036
|
+
/* What is selected stays visibly selected, in the same grey. */
|
|
7037
|
+
--qti-primary: var(--qti-color-disabled);
|
|
7038
|
+
--qti-selected-bg: var(--qti-color-disabled);
|
|
7039
|
+
--qti-selected-color: var(--qti-color-base-100);
|
|
7040
|
+
--qti-primary-fg: var(--qti-color-base-100);
|
|
7041
|
+
|
|
7042
|
+
/* Chips, filled or not, and their handles. */
|
|
7043
|
+
--drag-background-color: var(--qti-color-base-100);
|
|
7044
|
+
--drag-color: var(--qti-color-disabled);
|
|
7045
|
+
--drag-border-color: var(--qti-color-disabled);
|
|
7046
|
+
--drag-box-shadow: none;
|
|
7047
|
+
--qti-grip-color: var(--qti-color-disabled);
|
|
7048
|
+
}
|
|
5867
7049
|
}
|
|
5868
7050
|
|
|
5869
7051
|
@layer qti-components.interactions.corrections{
|
|
@@ -5942,8 +7124,8 @@ qti-slider-interaction {
|
|
|
5942
7124
|
/* `display: block` is declared by the element itself, in qti-rubric-block.ts. */
|
|
5943
7125
|
qti-rubric-block {
|
|
5944
7126
|
border: var(--qti-border-thickness) solid var(--qti-info);
|
|
5945
|
-
background-color: color-mix(in
|
|
5946
|
-
border-radius: var(--qti-
|
|
7127
|
+
background-color: color-mix(in oklab, var(--qti-info) 5%, var(--qti-bg));
|
|
7128
|
+
border-radius: var(--qti-radius-box);
|
|
5947
7129
|
padding: var(--qti-padding-box);
|
|
5948
7130
|
margin-top: var(--qti-gap);
|
|
5949
7131
|
}
|
|
@@ -5972,12 +7154,23 @@ qti-feedback-block::part(feedback) {
|
|
|
5972
7154
|
width: 100%;
|
|
5973
7155
|
border: var(--qti-border-thickness) solid var(--qti-info);
|
|
5974
7156
|
background-color: var(--qti-bg);
|
|
5975
|
-
border-radius: var(--qti-
|
|
7157
|
+
border-radius: var(--qti-radius-box);
|
|
5976
7158
|
padding: var(--qti-padding-box);
|
|
5977
7159
|
margin-top: var(--qti-gap);
|
|
5978
7160
|
}
|
|
5979
7161
|
}
|
|
5980
7162
|
|
|
7163
|
+
@layer qti-components.elements{
|
|
7164
|
+
/*
|
|
7165
|
+
* The QTI 3 shared vocabulary (qti-native/qti3p0.css) in the theme's shape. Its colours come from
|
|
7166
|
+
* the hooks filled in qti-variables.css; what a hook cannot carry is restated here. The vocabulary's
|
|
7167
|
+
* well has a fixed 4px corner; a theme rounds its boxes with --qti-radius-box.
|
|
7168
|
+
*/
|
|
7169
|
+
.qti-well {
|
|
7170
|
+
border-radius: var(--qti-radius-box);
|
|
7171
|
+
}
|
|
7172
|
+
}
|
|
7173
|
+
|
|
5981
7174
|
@layer qti-components.global{
|
|
5982
7175
|
/*
|
|
5983
7176
|
* Cross-interaction custom states.
|
|
@@ -6002,10 +7195,10 @@ qti-feedback-block::part(feedback) {
|
|
|
6002
7195
|
*/
|
|
6003
7196
|
::part(message) {
|
|
6004
7197
|
color: var(--qti-fg);
|
|
6005
|
-
background-color: color-mix(in
|
|
7198
|
+
background-color: color-mix(in oklab, var(--qti-warning) 5%, var(--qti-bg));
|
|
6006
7199
|
padding: var(--qti-padding-box);
|
|
6007
7200
|
border: var(--qti-border-thickness) solid var(--qti-warning);
|
|
6008
|
-
border-radius: var(--qti-
|
|
7201
|
+
border-radius: var(--qti-radius-box);
|
|
6009
7202
|
margin-top: var(--qti-gap);
|
|
6010
7203
|
}
|
|
6011
7204
|
|