@anydigital/bricks 0.25.0 → 0.26.0-alpha

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 CHANGED
@@ -1,32 +1,36 @@
1
- # *Any*bricks
1
+ # `bricks[.css]` <sup><sub>by *Any*digital</sub></sup>
2
2
 
3
- Framework-agnostic CSS utilities and single-file Liquid 'bricks' for modern web development.
3
+ Framework-agnostic, Tailwind-compatible CSS utilities and single-file `bricks` for modern web development.
4
4
 
5
- ## Installation
5
+ <!--section:css-h2-->
6
+
7
+ ## CSS 'Bricks' <br><sub>from https://github.com/anydigital/bricks</sub> <a id="bricks"></a>
6
8
 
7
- ### Via CDN
9
+ ### Install CSS
10
+
11
+ Via CDN:
8
12
 
9
13
  ```html
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@anydigital/bricks@1/dist/bricks.css" />
14
+ <link href="https://cdn.jsdelivr.net/npm/@anydigital/bricks@0/dist/bricks.min.css" rel="stylesheet" />
11
15
  ```
12
16
 
13
- ### Via npm
17
+ Or import source styles via npm:
14
18
 
15
19
  ```sh
16
20
  npm install @anydigital/bricks
17
21
  ```
18
22
 
19
- Then import in your CSS:
20
-
21
- ```css
23
+ ```css {data-caption=.css}
22
24
  @import "@anydigital/bricks";
23
25
  ```
24
26
 
25
- <!--section:css-h2-->
27
+ <details><summary>
28
+
29
+ ### `_base.css` styles
26
30
 
27
- ## CSS 'Bricks'
31
+ </summary>
28
32
 
29
- ### Overflow Control
33
+ #### Overflow Control
30
34
 
31
35
  Prevents horizontal overflow and scrolling on the entire page:
32
36
 
@@ -39,7 +43,7 @@ body {
39
43
 
40
44
  This is automatically applied when you include the stylesheet.
41
45
 
42
- ### Full Viewport Height
46
+ #### Full Viewport Height
43
47
 
44
48
  Ensures the body element takes at least the full height of the viewport using dynamic viewport height for better mobile support:
45
49
 
@@ -51,7 +55,26 @@ body {
51
55
 
52
56
  This is automatically applied when you include the stylesheet.
53
57
 
54
- ### Typography Enhancements
58
+ #### Flexbox Layout
59
+
60
+ Sets up a flexible column layout structure:
61
+
62
+ ```css
63
+ body {
64
+ display: flex;
65
+ flex-direction: column;
66
+ }
67
+
68
+ body > main {
69
+ flex-grow: 1;
70
+ }
71
+ ```
72
+
73
+ The body becomes a flex container with column direction, and `main` elements automatically grow to fill available space. This is useful for creating sticky footers and full-height layouts.
74
+
75
+ This is automatically applied when you include the stylesheet.
76
+
77
+ #### Typography Enhancements
55
78
 
56
79
  Improves text rendering and readability:
57
80
 
@@ -69,7 +92,13 @@ body {
69
92
 
70
93
  This is automatically applied when you include the stylesheet.
71
94
 
72
- ### Prose Styling
95
+ </details>
96
+
97
+ <details><summary>
98
+
99
+ ### `_prose.css` Tailwind Typography enhancements
100
+
101
+ </summary>
73
102
 
74
103
  The `.prose` class provides enhanced typography for article content and long-form text with container-like behavior:
75
104
 
@@ -112,7 +141,9 @@ The `.prose` class provides enhanced typography for article content and long-for
112
141
 
113
142
  - Code blocks with `data-caption` attribute display the caption above the code block (styled with 50% opacity, italic, and `1.5em` bottom margin)
114
143
 
115
- ### Code Highlighting
144
+ </details>
145
+
146
+ ### `_prism.css` enhancements
116
147
 
117
148
  Includes specialized styling for Prism.js, specifically focusing on treeview components:
118
149
 
@@ -122,7 +153,11 @@ Includes specialized styling for Prism.js, specifically focusing on treeview com
122
153
  - Last-child entry names have no `::before` pseudo-element
123
154
  - Supports complex file tree visualizations out of the box
124
155
 
125
- ### Utilities
156
+ <details><summary>
157
+
158
+ ### `_util.css` helpers
159
+
160
+ </summary>
126
161
 
127
162
  #### Scrollbar Inversion
128
163
 
@@ -159,26 +194,9 @@ This ensures the icon and the text stay together on the same line. If you need n
159
194
 
160
195
  This is automatically included when you import the stylesheet.
161
196
 
162
- ### Flexbox Layout
163
-
164
- Sets up a flexible column layout structure:
165
-
166
- ```css
167
- body {
168
- display: flex;
169
- flex-direction: column;
170
- }
171
-
172
- body > main {
173
- flex-grow: 1;
174
- }
175
- ```
197
+ </details>
176
198
 
177
- The body becomes a flex container with column direction, and `main` elements automatically grow to fill available space. This is useful for creating sticky footers and full-height layouts.
178
-
179
- This is automatically applied when you include the stylesheet.
180
-
181
- ### Breakout CSS
199
+ ### `breakout-css` included
182
200
 
183
201
  Includes [breakout-css](https://github.com/anydigital/breakout-css) utilities for breaking out images and figures beyond their container width. Use the `.breakout` class to allow elements to extend beyond their parent container:
184
202
 
@@ -192,11 +210,11 @@ The breakout container has `10%` inline padding and a max-width of `calc(10% + 6
192
210
 
193
211
  <!--section:njk-liquid-h2-->
194
212
 
195
- ## Universal Template 'Bricks' <small>(`.njk` & `.liquid`)</small> <sub>from https://github.com/anydigital/bricks</sub>
213
+ ## Universal Template 'Bricks' <small>(`.njk` & `.liquid`)</small> <br><sub>from https://github.com/anydigital/bricks</sub>
196
214
 
197
- The package includes reusable templates in the `bricks/` directory. These are useful for common web development patterns.
215
+ The package includes reusable templates in the `./src/bricks/` directory. These are useful for common web development patterns.
198
216
 
199
- ### Installation
217
+ ### Install Templates
200
218
 
201
219
  ```sh
202
220
  npm install @anydigital/bricks
@@ -283,8 +301,12 @@ A navigation template `bricks/_nav.{njk|liquid}` that renders a list of navigati
283
301
  </nav>
284
302
  ```
285
303
 
304
+ <details><summary>
305
+
286
306
  ### Google Tag Manager <small>(`_gtm.*`)</small>
287
307
 
308
+ </summary>
309
+
288
310
  A template `bricks/_gtm.{njk|liquid}` for embedding Google Tag Manager scripts in your pages.
289
311
 
290
312
  **Parameters:**
@@ -298,8 +320,4 @@ A template `bricks/_gtm.{njk|liquid}` for embedding Google Tag Manager scripts i
298
320
  - https://github.com/anydigital/bricks/blob/main/bricks/__html.njk
299
321
  - https://github.com/anydigital/bricks/blob/main/bricks/__html.liquid
300
322
 
301
- <!--section-->
302
-
303
- ## License
304
-
305
- MIT
323
+ </details>
package/_config.yml ADDED
@@ -0,0 +1,4 @@
1
+ exclude:
2
+ - "**/*"
3
+ include:
4
+ - "*.md"
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
6
6
  <title>
7
- {{- title | strip_html | append: ' | ' | if: title -}}
7
+ {%- if title %}{{ title | strip_html | append: ' | ' }}{% endif -%}
8
8
  {{- site.title -}}
9
9
  </title>
10
10
  <link rel="icon" href="/favicon.ico">
@@ -12,24 +12,24 @@
12
12
  {%- for href in site.styles %}
13
13
  <link rel="stylesheet" href="{{ href }}">
14
14
  {%- endfor %}
15
- {% # prettier-ignore %}
16
- <style>{{ site.inline_styles | join: '\n' }}</style>
17
- {% # %}
15
+ <style>
16
+ {{ site.inline_styles | join: '\n' }}
17
+ </style>
18
18
 
19
19
  {%- for src in site.scripts %}
20
20
  <script src="{{ src }}" defer></script>
21
21
  {%- endfor %}
22
- {% # prettier-ignore %}
23
- <script type="module">{{ site.inline_scripts | join: '\n' }}</script>
24
- {% # %}
22
+ <script type="module">
23
+ {{ site.inline_scripts | join: '\n' }}
24
+ </script>
25
25
 
26
26
  {{ content_for_header }}
27
- {% render './_gtm', site: site %}
27
+ {% include bricks/gtm.liquid %}
28
28
  </head>
29
29
 
30
30
  <body>
31
- {% render './_gtm', site: site, for_body: true %}
31
+ {% include bricks/gtm.liquid for_body=true %}
32
+
32
33
  {{ body }}
33
- {% # %}
34
34
  </body>
35
35
  </html>
@@ -12,23 +12,23 @@
12
12
  {%- for href in site.styles %}
13
13
  <link rel="stylesheet" href="{{ href }}" />
14
14
  {%- endfor %}
15
- {# prettier-ignore-start #}
16
- <style>{{ site.inline_styles | d([]) | join('\n') }}</style>
17
- {# prettier-ignore-end #}
15
+ {# prettier-ignore-start #}<style>
16
+ {{ site.inline_styles | d([]) | join('\n') }}
17
+ </style>{# prettier-ignore-end #}
18
18
 
19
19
  {%- for src in site.scripts %}
20
20
  <script src="{{ src }}" defer></script>
21
21
  {%- endfor %}
22
- {# prettier-ignore-start #}
23
- <script type="module">{{ site.inline_scripts | d([]) | join('\n') }}</script>
24
- {# prettier-ignore-end #}
22
+ {# prettier-ignore-start #}<script type="module">
23
+ {{ site.inline_scripts | d([]) | join('\n') }}
24
+ </script>{# prettier-ignore-end #}
25
25
 
26
26
  {{ content_for_header }}
27
- {% include 'bricks/_gtm.njk' %}
27
+ {% include 'bricks/gtm.njk' %}
28
28
  </head>
29
29
 
30
30
  <body>
31
- {% set for_body = true %}{% include 'bricks/_gtm.njk' %}
31
+ {% set for_body = true %}{% include 'bricks/gtm.njk' %}
32
32
  {% block body %}
33
33
  {% endblock %}
34
34
  </body>
package/bricks.gemspec ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "bricks"
5
+ spec.version = "0.25.0"
6
+ spec.authors = ["Anton Staroverov"]
7
+
8
+ spec.summary = "Framework-agnostic CSS utilities and single-file Liquid 'bricks' for modern web development."
9
+ spec.homepage = "https://github.com/anydigital/bricks"
10
+ spec.license = "MIT"
11
+
12
+ spec.files = Dir.glob("{_includes}/**/*")
13
+ # puts "spec.files: #{spec.files.inspect}"
14
+
15
+ spec.add_runtime_dependency "jekyll", ">= 3.5", "< 5.0"
16
+ end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anydigital/bricks",
3
- "version": "0.25.0",
3
+ "version": "0.26.0-alpha",
4
4
  "description": "Framework-agnostic CSS utilities and single-file Liquid 'bricks' for modern web development.",
5
5
  "style": "./src/bricks.css",
6
6
  "exports": {