@anydigital/bricks 1.0.0-alpha.17 → 1.0.0-alpha.19
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/README.md +9 -8
- package/bricks/_prose.css +9 -14
- package/dist/bricks.css +25 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -81,20 +81,19 @@ The `.prose` class provides enhanced typography for article content and long-for
|
|
|
81
81
|
- Custom underline offset (`0.1em`) and thickness (`1px` default, `2px` on hover)
|
|
82
82
|
- Anchor links (starting with `#`) have no text decoration
|
|
83
83
|
- Special handling for `small`, `sup`, or `sub` elements: lighter weight (`300`) and displayed as `inline-block` to prevent underline decoration
|
|
84
|
-
- Icon helper: `i` elements inside links are displayed as `inline-block` with normal font style to prevent underline decoration, with `1em` height, `-10%` vertical alignment, and `0.25em` right margin. Nested `img` elements are styled with `100%` height and
|
|
84
|
+
- Icon helper: `i` elements inside links are displayed as `inline-block` with normal font style to prevent underline decoration, with `1em` height, `-10%` vertical alignment, and `0.25em` right margin. Nested `img` elements are styled with `100%` height and `1em` bottom margin
|
|
85
85
|
|
|
86
86
|
**Headings:**
|
|
87
87
|
|
|
88
|
-
- `h1` with `small`, `sup`, or `sub` elements get reduced font size (`0.5em`) and lighter weight (`300`)
|
|
88
|
+
- `h1` with `small`, `sup`, or `sub` elements get reduced font size (`0.5em`) and lighter weight (`300`). The `h1` itself has a `0.5em` bottom margin.
|
|
89
89
|
|
|
90
90
|
**Tables:**
|
|
91
91
|
|
|
92
|
-
- Tables are
|
|
93
|
-
- On mobile (max-width: 767px), tables get `1.5em` horizontal padding
|
|
92
|
+
- Tables within `.breakout` containers are automatically styled for full-bleed display and horizontal scrolling
|
|
94
93
|
- Table cells (`th` and `td`) have `1em` vertical padding (top and bottom) and `top` vertical alignment
|
|
95
|
-
- Workaround for widening columns using hidden `hr` elements (
|
|
94
|
+
- Workaround for widening columns using hidden `hr` elements (width: `25ch`, with zero margin and hidden visibility)
|
|
96
95
|
- Support for headings in Markdown tables using `big` elements (styled as bold)
|
|
97
|
-
- Images in table cells have no top margin and `
|
|
96
|
+
- Images in table cells have no top margin and `1em` bottom margin
|
|
98
97
|
|
|
99
98
|
**Blockquotes:**
|
|
100
99
|
|
|
@@ -110,7 +109,9 @@ The `.prose` class provides enhanced typography for article content and long-for
|
|
|
110
109
|
Includes specialized styling for Prism.js, specifically focusing on treeview components:
|
|
111
110
|
|
|
112
111
|
- Custom styling for `.token.treeview-part`
|
|
113
|
-
- Reduced opacity for entry lines and names to create a hierarchical visual effect
|
|
112
|
+
- Reduced opacity for entry lines (25%) and names (50%) to create a hierarchical visual effect
|
|
113
|
+
- Entry lines have a fixed width of `2.5em`
|
|
114
|
+
- Last-child entry names have no `::before` pseudo-element
|
|
114
115
|
- Supports complex file tree visualizations out of the box
|
|
115
116
|
|
|
116
117
|
### Utilities
|
|
@@ -167,7 +168,7 @@ Includes [breakout-css](https://github.com/anydigital/breakout-css) utilities fo
|
|
|
167
168
|
</div>
|
|
168
169
|
```
|
|
169
170
|
|
|
170
|
-
The breakout utilities support images, pictures, figures, canvas, audio, video, tables, pre, iframe, and other media elements. This is automatically included when you import the stylesheet.
|
|
171
|
+
The breakout utilities support images, pictures, figures, canvas, audio, video, tables, pre, iframe, and other media elements. Tables inside `.breakout` are specifically enhanced for horizontal scrolling and full-bleed mobile display. This is automatically included when you import the stylesheet.
|
|
171
172
|
|
|
172
173
|
## Bricks (Template Components)
|
|
173
174
|
|
package/bricks/_prose.css
CHANGED
|
@@ -34,11 +34,17 @@
|
|
|
34
34
|
|
|
35
35
|
img {
|
|
36
36
|
height: 100%;
|
|
37
|
-
margin: 0 !important;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
|
|
41
|
+
img {
|
|
42
|
+
&:not(:where(.prose > img, .prose > p > img)) {
|
|
43
|
+
margin-top: 0;
|
|
44
|
+
margin-bottom: 1em;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
42
48
|
h1 {
|
|
43
49
|
margin-bottom: 0.5em !important;
|
|
44
50
|
|
|
@@ -50,13 +56,6 @@
|
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
|
|
53
|
-
table {
|
|
54
|
-
display: block;
|
|
55
|
-
overflow-x: auto;
|
|
56
|
-
@media (max-width: 767px) {
|
|
57
|
-
padding-inline: 1.5em;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
59
|
th,
|
|
61
60
|
td {
|
|
62
61
|
padding-top: 1em;
|
|
@@ -64,7 +63,8 @@
|
|
|
64
63
|
vertical-align: top;
|
|
65
64
|
/* Workaround to widen particular columns */
|
|
66
65
|
hr {
|
|
67
|
-
|
|
66
|
+
width: 25ch;
|
|
67
|
+
height: 0;
|
|
68
68
|
margin: 0;
|
|
69
69
|
visibility: hidden;
|
|
70
70
|
}
|
|
@@ -72,11 +72,6 @@
|
|
|
72
72
|
big {
|
|
73
73
|
font-weight: bold;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
img {
|
|
77
|
-
margin-top: 0;
|
|
78
|
-
margin-bottom: 0.75em;
|
|
79
|
-
}
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
blockquote {
|
package/dist/bricks.css
CHANGED
|
@@ -74,9 +74,13 @@ body a {
|
|
|
74
74
|
|
|
75
75
|
.prose a i img {
|
|
76
76
|
height: 100%;
|
|
77
|
-
margin: 0 !important;
|
|
78
77
|
}
|
|
79
78
|
|
|
79
|
+
.prose img:not(:where(.prose > img,.prose > p > img)) {
|
|
80
|
+
margin-top: 0;
|
|
81
|
+
margin-bottom: 1em;
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
.prose h1 {
|
|
81
85
|
margin-bottom: 0.5em !important;
|
|
82
86
|
}
|
|
@@ -86,18 +90,6 @@ body a {
|
|
|
86
90
|
font-weight: 300;
|
|
87
91
|
}
|
|
88
92
|
|
|
89
|
-
.prose table {
|
|
90
|
-
display: block;
|
|
91
|
-
overflow-x: auto;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@media (max-width: 767px) {
|
|
95
|
-
|
|
96
|
-
.prose table {
|
|
97
|
-
padding-inline: 1.5em;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
93
|
.prose th,.prose td {
|
|
102
94
|
padding-top: 1em;
|
|
103
95
|
padding-bottom: 1em;
|
|
@@ -106,7 +98,8 @@ body a {
|
|
|
106
98
|
}
|
|
107
99
|
|
|
108
100
|
.prose th hr,.prose td hr {
|
|
109
|
-
|
|
101
|
+
width: 25ch;
|
|
102
|
+
height: 0;
|
|
110
103
|
margin: 0;
|
|
111
104
|
visibility: hidden;
|
|
112
105
|
}
|
|
@@ -117,11 +110,6 @@ body a {
|
|
|
117
110
|
font-weight: bold;
|
|
118
111
|
}
|
|
119
112
|
|
|
120
|
-
.prose th img,.prose td img {
|
|
121
|
-
margin-top: 0;
|
|
122
|
-
margin-bottom: 0.75em;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
113
|
.prose blockquote {
|
|
126
114
|
font-weight: 300;
|
|
127
115
|
}
|
|
@@ -169,6 +157,24 @@ body a {
|
|
|
169
157
|
min-width: auto;
|
|
170
158
|
}
|
|
171
159
|
|
|
160
|
+
/* Tables are so special :( */
|
|
161
|
+
|
|
162
|
+
.breakout > table:not(does-not-exist):not(.does-not-exist),.breakout > p > table:not(.does-not-exist) {
|
|
163
|
+
/* .does-not-exist is here to avoid !important below @TODO */
|
|
164
|
+
|
|
165
|
+
/* Let them full-bleed */
|
|
166
|
+
width: -moz-max-content;
|
|
167
|
+
width: max-content;
|
|
168
|
+
min-width: auto;
|
|
169
|
+
max-width: 100vw;
|
|
170
|
+
padding-inline: 1.5rem;
|
|
171
|
+
|
|
172
|
+
/* Let them scroll */
|
|
173
|
+
display: block;
|
|
174
|
+
overflow-x: auto;
|
|
175
|
+
-webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
|
|
176
|
+
}
|
|
177
|
+
|
|
172
178
|
/* Max out the width of the element */
|
|
173
179
|
|
|
174
180
|
.breakout > .breakout-item-max:not(does-not-exist),.breakout > p > .breakout-item-max {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anydigital/bricks",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "Framework-agnostic CSS utilities and single-file Liquid 'bricks' for modern web development.",
|
|
5
5
|
"main": "dist/bricks.css",
|
|
6
6
|
"style": "dist/bricks.css",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"author": "Anton Staroverov",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@anydigital/breakout-css": "^1.0.0-alpha.
|
|
27
|
+
"@anydigital/breakout-css": "^1.0.0-alpha.9",
|
|
28
28
|
"postcss": "^8.4.33",
|
|
29
29
|
"postcss-cli": "^11.0.0",
|
|
30
30
|
"postcss-import": "^16.1.1",
|