@maggioli-design-system/styles 17.4.0 → 17.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,19 +18,36 @@
18
18
  animation-play-state: running;
19
19
  }
20
20
 
21
+ /* The text-box utilities trim nothing in an <input>: its line scrolls inside a box exactly as
22
+ * tall as the line, the trim leaves the glyphs taller than that box, and a drag that selects the
23
+ * text scrolls it up and down by the trimmed half-leading. The field sets its own height, so the
24
+ * trim gains nothing there. A <textarea> or a <select> keeps it: it adds no scroll to them. */
25
+
21
26
  @utility text-box-uppercase {
22
27
  min-height: auto;
23
28
  text-box: trim-both cap alphabetic;
29
+
30
+ &:where(input) {
31
+ text-box: normal;
32
+ }
24
33
  }
25
34
 
26
35
  @utility text-box-vertical-margin {
27
36
  min-height: auto;
28
37
  text-box: trim-both text;
38
+
39
+ &:where(input) {
40
+ text-box: normal;
41
+ }
29
42
  }
30
43
 
31
44
  @utility text-box-vertical-align {
32
45
  min-height: auto;
33
46
  text-box: trim-both cap alphabetic;
47
+
48
+ &:where(input) {
49
+ text-box: normal;
50
+ }
34
51
  }
35
52
 
36
53
  @utility hide-scrollbar {
@@ -59,6 +76,59 @@
59
76
  visibility: hidden;
60
77
  }
61
78
 
79
+ /* The frame of a page (widths/page, #1189): the content stops at --magma-width-page and the
80
+ * gutter stays outside it, so the edge of the page is the edge of the content of mds-header-bar
81
+ * at every width. One element: the frame is the gutter and the width together. */
82
+ @utility page-frame {
83
+ box-sizing: content-box;
84
+ margin-inline: auto;
85
+ max-width: var(--magma-width-page, 1280px);
86
+ padding-inline: var(--magma-width-page-gutter, 24px);
87
+ }
88
+
89
+ /* A group of fields (widths/field and titles/group, #1189): the fieldset of a form, with no
90
+ * border and no inset of its own, its legend in the style of a group title, the fields
91
+ * --magma-rhythm-between-fields apart. From 28rem up it lays out two tracks: a short field
92
+ * (mds-input-field short) takes one, so two short fields in a row share it and a lone one is
93
+ * half; every other child spans both. A track is never narrower than half of 28rem less half
94
+ * the gap, so the threshold is measured on the group itself, with no container query to place,
95
+ * and min(100%) keeps a track inside a narrow window. 28rem stays a literal: it is where the
96
+ * longest short answer mds-input knows, the tax code (16 characters), still fits a half. The
97
+ * rendered legend is no item of the grid: its space is a margin under it. */
98
+ @utility field-group {
99
+ align-items: start;
100
+ border: 0;
101
+ display: grid;
102
+ gap: var(--magma-rhythm-between-fields, 24px);
103
+ grid-template-columns: repeat(
104
+ auto-fill,
105
+ minmax(
106
+ min(
107
+ 100%,
108
+ max(
109
+ 14rem - var(--magma-rhythm-between-fields, 24px) / 2,
110
+ (100% - var(--magma-rhythm-between-fields, 24px)) / 2 - 1px
111
+ )
112
+ ),
113
+ 1fr
114
+ )
115
+ );
116
+ margin: 0;
117
+ min-inline-size: 0;
118
+ padding: 0;
119
+
120
+ & > :not([short], legend) {
121
+ grid-column: 1 / -1;
122
+ }
123
+
124
+ & > legend {
125
+ @apply text-title-group;
126
+
127
+ margin-block-end: var(--magma-rhythm-title-content, 12px);
128
+ padding: 0;
129
+ }
130
+ }
131
+
62
132
  @layer utilities {
63
133
  /* .focus-bounce:focus-visible {
64
134
  --magma-outline-blur: var(--magma-outline-focus);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/styles",
3
- "version": "17.4.0",
3
+ "version": "17.6.0",
4
4
  "description": "This module contains SCSS and CSS styles used by Maggioli Design System, it also makes available a Tailwind config based on Maggioli design tokens.",
5
5
  "main": "./tailwind.config.js",
6
6
  "scripts": {
@@ -64,16 +64,16 @@
64
64
  "@fontsource/merriweather": "5.3.0",
65
65
  "@fontsource/roboto": "5.3.0",
66
66
  "@fontsource/roboto-mono": "5.3.0",
67
- "@maggioli-design-system/design-tokens": "^15.3.0",
67
+ "@maggioli-design-system/design-tokens": "^15.5.0",
68
68
  "normalize.css": "8.0.1"
69
69
  },
70
70
  "devDependencies": {
71
- "@tailwindcss/postcss": "4.3.3",
72
- "autoprefixer": "10.6.1",
71
+ "@tailwindcss/postcss": "4.3.4",
72
+ "autoprefixer": "10.6.2",
73
73
  "handlebars": "4.7.10",
74
74
  "postcss-cli": "11.0.1",
75
- "postcss": "8.5.31",
75
+ "postcss": "8.5.32",
76
76
  "postcss-import": "16.2.0",
77
- "tailwindcss": "4.3.3"
77
+ "tailwindcss": "4.3.4"
78
78
  }
79
79
  }