@terrahq/wysiwyg 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +666 -746
  2. package/content/wordpress-content.html +193 -152
  3. package/dist/content/wordpress-content.html +185 -154
  4. package/dist/wordpress-starter/assets/icons/ArrowRight.svg +3 -0
  5. package/package.json +1 -1
  6. package/public/wordpress-starter/assets/icons/ArrowRight.svg +3 -0
  7. package/readme/blocks/Button.md +33 -13
  8. package/readme/blocks/Columns.md +28 -13
  9. package/readme/blocks/Links.md +2 -0
  10. package/readme/blocks/Quote.md +12 -0
  11. package/readme/blocks/Separator.md +25 -0
  12. package/readme/blocks/Table.md +96 -103
  13. package/readme/blocks/Video.md +80 -11
  14. package/readme/properties/Background.md +74 -0
  15. package/readme/properties/Font.md +15 -0
  16. package/readme/properties/Media.md +33 -0
  17. package/src/assets/icons/ArrowRight.svg +3 -0
  18. package/src/scss/_paths.scss +2 -1
  19. package/src/scss/framework/_var/_vars.scss +1 -1
  20. package/src/scss/framework/components/btn/_c--btn-a.scss +1 -0
  21. package/src/scss/framework/components/content/_c--content-a.scss +405 -455
  22. package/src/scss/framework/components/link/_c--link-a.scss +38 -7
  23. package/src/scss/global-content/_global-mixins/blocks/_content-block-btn.scss +25 -6
  24. package/src/scss/global-content/_global-mixins/blocks/_content-block-columns.scss +11 -0
  25. package/src/scss/global-content/_global-mixins/blocks/_content-block-quote.scss +23 -6
  26. package/src/scss/global-content/_global-mixins/blocks/_content-block-separator.scss +49 -3
  27. package/src/scss/global-content/_global-mixins/blocks/_content-block-table.scss +79 -7
  28. package/src/scss/global-content/_global-mixins/blocks/_content-links.scss +9 -2
  29. package/src/scss/global-content/_global-mixins/properties/_background.scss +50 -0
  30. package/src/scss/global-content/_global-mixins/properties/_font.scss +18 -6
  31. package/src/scss/global-content/_global-mixins/properties/_properties.scss +1 -0
  32. package/src/scss/sanity.scss +17 -1
  33. package/src/scss/wp.scss +441 -256
@@ -1,31 +1,46 @@
1
1
  # Columns
2
2
 
3
- Here are the styling options for columns.
3
+ Here are the styling options for columns (the `wp-block-columns` block). Just for WP.
4
+
5
+ By default the columns are **equal width** (each column shares the available space evenly). A column that carries its own width (WordPress adds an inline `flex-basis`) keeps that width.
4
6
 
5
7
  ## Editable options
6
8
 
7
9
  ### breakpoint
8
10
 
9
- This value indicates the breakpoint at which the columns transitions to a single column.
11
+ This value indicates the breakpoint at which the columns transition to a single column (they stack).
10
12
 
11
13
  The value for this property must be a numerical value in pixels (px).
12
14
 
13
- ### margin-bottom
15
+ ### column-gap
16
+
17
+ This property sets the horizontal gap between columns.
18
+
19
+ The value must be a numerical value expressed in any unit.
14
20
 
15
- This property sets the margin-bottom of the button.
21
+ ### row-gap
22
+
23
+ This property sets the vertical gap between columns when they wrap or stack.
16
24
 
17
25
  The value must be a numerical value expressed in any unit.
18
26
 
27
+ ### margin-bottom
28
+
29
+ This property sets the margin-bottom of the columns block.
30
+
31
+ The value must be a numerical value expressed in any unit.
19
32
 
20
33
  ## SCSS
21
34
 
22
35
  ```scss
23
- .c--content-X {
24
- @include make-content-modifier (
25
- $columns-options: (
26
- "breakpoint": $tablets,
27
- "margin-bottom": $measure*4,
28
- )
29
- );
30
- }
31
- ```
36
+ .c--content-X {
37
+ @include make-content-modifier(
38
+ $columns-options: (
39
+ "breakpoint": $tablets,
40
+ "column-gap": $measure * 4,
41
+ "row-gap": $measure * 4,
42
+ "margin-bottom": $measure * 4,
43
+ )
44
+ );
45
+ }
46
+ ```
@@ -2,6 +2,8 @@
2
2
 
3
3
  Here are the styling options for a link.
4
4
 
5
+ The link styles are applied to text links only. Anchors that **wrap an image** (e.g. a linked image) and the **button block link** (`.wp-block-button__link`) are excluded, so they don't inherit the link styles (color, underline, hover, etc.).
6
+
5
7
  ## Editable options
6
8
 
7
9
  ### className
@@ -22,6 +22,10 @@ This property sets the margin-bottom of the quote.
22
22
 
23
23
  The value must be a numerical value expressed in any unit.
24
24
 
25
+ ### background
26
+
27
+ The background property accepts the background styling options (background color, background image and `overlay`) listed [here](../properties/Background.md).
28
+
25
29
  ### border
26
30
 
27
31
  The border property accepts the border styling options listed [here](../properties/Border.md).
@@ -44,6 +48,14 @@ The cite property accepts the text-related styling options listed [here](../prop
44
48
  "padding": $measure*5 0,
45
49
  "margin-top": $measure,
46
50
  "margin-bottom": $measure*5,
51
+ "background": (
52
+ "background-color": #1a1a1a,
53
+ "background-image": url("/images/quote-bg.jpg"),
54
+ "background-size": cover,
55
+ "background-position": center,
56
+ "background-repeat": no-repeat,
57
+ "overlay": linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
58
+ ),
47
59
  "border": (
48
60
  "border-color": red,
49
61
  "border-radius": 0,
@@ -2,6 +2,31 @@
2
2
 
3
3
  Here are the styling options for a separator.
4
4
 
5
+ ## Styles
6
+
7
+ The WordPress separator block has three styles, all handled automatically:
8
+
9
+ - **Default** (`wp-block-separator`) and **Wide** (`is-style-wide`) render as a line and share the same styling (the options below apply to both).
10
+ - **Dots** (`is-style-dots`) renders as three centered dots (•••) instead of a line. By default it uses the `color` option for the dots, and it ignores the line-only properties (`height`, `width`). Its appearance can be fine-tuned with the dots-only options below.
11
+
12
+ ### dots-color
13
+
14
+ Color of the dots in `is-style-dots`. Overrides `color` for the dots only.
15
+
16
+ Possible values: same as `color`.
17
+
18
+ ### dots-size
19
+
20
+ Size of the dots in `is-style-dots`.
21
+
22
+ The value must be a numerical value expressed in any unit.
23
+
24
+ ### dots-spacing
25
+
26
+ Spacing between the dots in `is-style-dots`.
27
+
28
+ The value must be a numerical value expressed in any unit (e.g. `1.5em`).
29
+
5
30
  ## Editable options
6
31
 
7
32
  ### margin
@@ -1,30 +1,47 @@
1
1
  # Table
2
2
 
3
- Here are the styling options for a table.
3
+ Here are the styling options for a table (the `wp-block-table` block). Just for WP.
4
+
5
+ The markup is a `<figure class="wp-block-table">` wrapping a `<table>` (with an optional `<figcaption>`). Header cells are `<th>` inside `<thead>`; body cells are `<td>` inside `<tbody>`.
6
+
7
+ ## Always-on behaviour
8
+
9
+ These rules are applied automatically so you never get doubled borders on the edges:
10
+
11
+ - The **last cell of each body row** never gets a right border.
12
+ - The **cells of the last body row** never get a bottom border.
13
+ - The **last header cell** never gets a right border.
14
+
15
+ Also:
16
+
17
+ - `margin-bottom` is applied to the **block wrapper** (`.wp-block-table` `<figure>`), never to the `<table>` element.
18
+ - Cell borders are **right** and **bottom** only (there are no left/top border options, by design, to avoid double lines between cells). The outer frame is the `table-border`.
4
19
 
5
20
  ## Editable options
6
21
 
7
22
  ### header-font-styles
8
23
 
9
- This property sets the font styles for the table header.
24
+ Font styles for the header cells (`<th>`). Accepts **all** the text-related options listed [here](../properties/Font.md) (`color`, `font-family`, `font-size`, `bold-color`, `bold-font-weight`, `className`, etc.).
10
25
 
11
- The header-font-styles property accepts the text-related styling options listed [here](../properties/Font.md).
26
+ ### body-font-styles
12
27
 
13
- ### header-cells-padding
28
+ Font styles for the body cells (`<td>`). Accepts all the options listed [here](../properties/Font.md).
14
29
 
15
- This property sets the padding for the table header.
30
+ ### caption
16
31
 
17
- The value must be a numerical value expressed in any unit.
32
+ Font styles for the table caption (`<figcaption>`). Accepts all the options listed [here](../properties/Font.md).
18
33
 
19
- ### header-border
34
+ ### header-cells-padding
20
35
 
21
- This property sets the border for the table header.
36
+ Padding of the header cells. The value must be a numerical value expressed in any unit.
22
37
 
23
- The border property accepts the border styling options listed [here](../properties/Border.md).
38
+ ### body-cells-padding
39
+
40
+ Padding of the body cells. The value must be a numerical value expressed in any unit.
24
41
 
25
42
  ### header-background
26
43
 
27
- This property sets the background for the table header.
44
+ Background of the header row.
28
45
 
29
46
  The possible values include:
30
47
 
@@ -37,77 +54,67 @@ The possible values include:
37
54
  - A color within a variable map (map.get($color-options, a))
38
55
  - Gradient (linear-gradient(90deg, map.get($color-options, i) 0%, map.get($color-options, h) 100%))
39
56
 
40
- ### body-font-styles
57
+ ### body-background
41
58
 
42
- This property sets the font styles for the table body.
59
+ Background of the body rows. Same possible values as `header-background`.
43
60
 
44
- The body-font-styles property accepts the text-related styling options listed [here](../properties/Font.md).
61
+ ### odd-rows-background
45
62
 
46
- ### body-cells-padding
63
+ Background of the **odd** rows of the body (`tbody tr:nth-child(odd)`). Same possible values as `header-background`.
47
64
 
48
- This property sets the padding for the table body.
65
+ ### odd-rows-text-color
49
66
 
50
- The value must be a numerical value expressed in any unit.
67
+ Text color of the **odd** rows of the body. Same color values as `header-background` (no gradient).
51
68
 
52
- ### body-border
69
+ ### table-border
53
70
 
54
- This property sets the border for the table body.
71
+ Border of the `<table>` element (the outer frame). Use a CSS `border` shorthand.
55
72
 
56
- The border property accepts the border styling options listed [here](../properties/Border.md).
73
+ Example value: `2px solid map.get($color-options, a)`.
57
74
 
58
- ### body-background
75
+ ### table-border-radius
59
76
 
60
- This property sets the background for the table body.
77
+ Border-radius of the `<table>`. To make the radius visible, it switches the table to `border-collapse: separate` and clips the corners with `overflow: hidden`.
61
78
 
62
- The possible values include:
79
+ The value must be a numerical value expressed in any unit.
63
80
 
64
- - Transparent (transparent)
65
- - A color name (red)
66
- - Hexadecimal color (#ffffff)
67
- - RGB color (rgb(255, 255, 255))
68
- - RGBA color (rgba(255, 255, 255, .5))
69
- - A variable referencing any of the above options ($color-a)
70
- - A color within a variable map (map.get($color-options, a))
71
- - Gradient (linear-gradient(90deg, map.get($color-options, i) 0%, map.get($color-options, h) 100%))
81
+ ### header-border
72
82
 
73
- ### odd-rows-background
83
+ > ⚠️ **Legacy / backward-compatibility only.** This option is kept so existing tables that already use it don't break. For new tables prefer the granular [`header-border-right`](#header-border-right) and [`header-border-bottom`](#header-border-bottom), which avoid doubled lines on the edges. If you set both a legacy and a granular option at the same time, the one declared **last in your `$table-options` map wins** (later declarations override earlier ones in the generated CSS), so pick one approach per table.
74
84
 
75
- This property sets the background of the odd rows in the table body.
85
+ Full border of **all** the header cells (`thead tr th`). Accepts the border styling options listed [here](../properties/Border.md) (`border-color`, `border-radius`, `border-style`, `border-width`).
76
86
 
77
- The possible values include:
87
+ ### header-border-right
78
88
 
79
- - Transparent (transparent)
80
- - A color name (red)
81
- - Hexadecimal color (#ffffff)
82
- - RGB color (rgb(255, 255, 255))
83
- - RGBA color (rgba(255, 255, 255, .5))
84
- - A variable referencing any of the above options ($color-a)
85
- - A color within a variable map (map.get($color-options, a))
86
- - Gradient (linear-gradient(90deg, map.get($color-options, i) 0%, map.get($color-options, h) 100%))
89
+ Right border of the header cells, **except the last one** (`thead tr th:not(:last-child)`). Use a CSS `border` shorthand, e.g. `1px solid map.get($color-options, a)`.
87
90
 
88
- ### odd-rows-text-color
91
+ ### header-border-bottom
89
92
 
90
- This property sets the color of the odd rows in the table body.
93
+ Bottom border of **all** the header cells (`thead tr th`). Use a CSS `border` shorthand.
91
94
 
92
- The possible values include:
95
+ ### body-border
93
96
 
94
- - Transparent (transparent)
95
- - A color name (red)
96
- - Hexadecimal color (#ffffff)
97
- - RGB color (rgb(255, 255, 255))
98
- - RGBA color (rgba(255, 255, 255, .5))
99
- - A variable referencing any of the above options ($color-a)
100
- - A color within a variable map (map.get($color-options, a))
97
+ > ⚠️ **Legacy / backward-compatibility only.** This option is kept so existing tables that already use it don't break. For new tables prefer the granular [`body-border-right`](#body-border-right) and [`body-border-bottom`](#body-border-bottom), which avoid doubled lines on the edges. If you set both a legacy and a granular option at the same time, the one declared **last in your `$table-options` map wins** (later declarations override earlier ones in the generated CSS), so pick one approach per table.
101
98
 
102
- ### caption
99
+ Full border of **all** the body cells (`td`). Accepts the border styling options listed [here](../properties/Border.md) (`border-color`, `border-radius`, `border-style`, `border-width`).
100
+
101
+ ### body-border-right
102
+
103
+ Right border of the body cells, **except the last cell of each row** (`tbody tr td:not(:last-child)`). Use a CSS `border` shorthand.
104
+
105
+ ### body-border-bottom
106
+
107
+ Bottom border of the body cells, **except the cells of the last row** (`tbody tr:not(:last-child) td`). Use a CSS `border` shorthand.
108
+
109
+ ### scroll-breakpoint
103
110
 
104
- This property sets the font styles for the table caption.
111
+ Enables horizontal scroll on the table below the given max-width. Under that viewport width the block wrapper (`.wp-block-table`) gets `overflow-x: auto` and the `<table>` keeps a `min-width` (the same value) so it overflows and scrolls. Above it, the table behaves normally.
105
112
 
106
- The caption property accepts the text-related styling options listed [here](../properties/Font.md).
113
+ The value must be a numerical value in pixels (px).
107
114
 
108
115
  ### margin-bottom
109
116
 
110
- This property sets the margin-bottom of the table.
117
+ Margin-bottom of the table block (applied to the `.wp-block-table` wrapper, not the `<table>`).
111
118
 
112
119
  The value must be a numerical value expressed in any unit.
113
120
 
@@ -117,6 +124,7 @@ The value must be a numerical value expressed in any unit.
117
124
  .c--content-X {
118
125
  @include make-content-modifier(
119
126
  $table-options: (
127
+ // Font of the header / body / caption — accepts every Font.md option
120
128
  "header-font-styles": (
121
129
  "color": #638c1d,
122
130
  "font-family": arial,
@@ -131,68 +139,53 @@ The value must be a numerical value expressed in any unit.
131
139
  "text-underline-position": under,
132
140
  "className": f--font-a,
133
141
  "margin-bottom": 32px,
134
- "margin-bottom-before-lists": 24px,
135
142
  "padding-top": 8px,
136
143
  "text-align": center,
137
144
  "bold-font-weight": 800,
145
+ "bold-color": red,
138
146
  ),
139
147
  "body-font-styles": (
140
- "color": #638c1d,
141
- "font-family": arial,
142
- "font-size": 2rem,
143
- "font-style": italic,
144
- "font-weight": 400,
145
- "letter-spacing": 1px,
146
- "line-height": 1.5,
147
- "max-lines": 3,
148
- "text-decoration": underline,
149
- "text-decoration-color": #000000,
150
- "text-underline-position": under,
151
148
  "className": f--font-a,
152
- "margin-bottom": 32px,
153
- "margin-bottom-before-lists": 24px,
154
- "padding-top": 8px,
155
- "text-align": center,
156
149
  "bold-font-weight": 800,
150
+ "bold-color": red,
157
151
  ),
158
152
  "caption": (
159
- "color": #638c1d,
160
- "font-family": arial,
161
- "font-size": 2rem,
162
- "font-style": italic,
163
- "font-weight": 400,
164
- "letter-spacing": 1px,
165
- "line-height": 1.5,
166
- "max-lines": 3,
167
- "text-decoration": underline,
168
- "text-decoration-color": #000000,
169
- "text-underline-position": under,
170
- "className": f--font-a,
171
- "margin-bottom": 32px,
172
- "margin-bottom-before-lists": 24px,
173
- "padding-top": 8px,
174
- "text-align": center,
175
- "bold-font-weight": 800,
153
+ "className": f--font-f,
154
+ "text-align": right,
176
155
  ),
177
- "margin-bottom": $measure * 4,
156
+ // Padding
178
157
  "header-cells-padding": $measure * 2,
179
158
  "body-cells-padding": $measure $measure * 2,
180
- "header-border": (
181
- "border-radius": 1px,
182
- "border-width": 1px,
183
- "border-style": solid,
184
- "border-color": map.get($color-options, a),
185
- ),
159
+ // Backgrounds
186
160
  "header-background": map.get($color-options, a),
187
- "body-border": (
188
- "border-radius": 1px,
189
- "border-width": 1px,
190
- "border-style": solid,
191
- "border-color": map.get($color-options, a),
192
- ),
193
- "body-background": map.get($color-options, a),
194
- "odd-rows-background": map.get($color-options, c),
161
+ "body-background": rgba(map.get($color-options, e), 0.3),
162
+ "odd-rows-background": rgba(map.get($color-options, e), 0.5),
195
163
  "odd-rows-text-color": map.get($color-options, d),
164
+ // Table frame
165
+ "table-border": 2px solid map.get($color-options, a),
166
+ "table-border-radius": $measure * 2,
167
+ // Cell borders (right + bottom; edges excluded automatically) — RECOMMENDED
168
+ "header-border-right": 1px solid map.get($color-options, a),
169
+ "header-border-bottom": 2px solid map.get($color-options, a),
170
+ "body-border-right": 1px solid map.get($color-options, e),
171
+ "body-border-bottom": 1px solid map.get($color-options, e),
172
+ // LEGACY (backward-compatibility only): a full border on every cell.
173
+ // Prefer the granular *-border-right/-bottom above for new tables.
174
+ // Don't combine both — if set together, whichever is declared LAST wins.
175
+ // "header-border": (
176
+ // "border-color": map.get($color-options, a),
177
+ // "border-style": solid,
178
+ // "border-width": 1px,
179
+ // ),
180
+ // "body-border": (
181
+ // "border-color": map.get($color-options, e),
182
+ // "border-style": solid,
183
+ // "border-width": 1px,
184
+ // ),
185
+ // Horizontal scroll on small screens
186
+ "scroll-breakpoint": 700px,
187
+ // Spacing of the whole block
188
+ "margin-bottom": $measure * 4,
196
189
  )
197
190
  );
198
191
  }
@@ -1,24 +1,93 @@
1
1
  # Video
2
2
 
3
- Here are the styling options for a video.
3
+ Here are the styling options for a video (the `wp-block-video` and `wp-block-embed` blocks). Just for WP.
4
+
5
+ The styling options below apply to the `<iframe>` / `<video>` element, except `caption` (the `<figcaption>`) and `margin-bottom` (the block wrapper). These are the same shared media options as the [Image](./Image.md) block, **minus the `zoom-button-*` options**, which only apply to images (a video has no lightbox button).
4
6
 
5
7
  ## Editable options
6
8
 
9
+ ### border-color
10
+
11
+ Border color of the video.
12
+
13
+ Possible values include:
14
+
15
+ - Transparent (transparent)
16
+ - A color name (red)
17
+ - Hexadecimal color (#ffffff)
18
+ - RGB color (rgb(255, 255, 255))
19
+ - RGBA color (rgba(255, 255, 255, .5))
20
+ - A variable referencing any of the above options ($color-a)
21
+ - A color within a variable map (map.get($color-options, a))
22
+
23
+ ### border-radius
24
+
25
+ Border-radius of the video. The value must be a numerical value expressed in any unit.
26
+
27
+ ### border-style
28
+
29
+ Border style of the video. Values can include those accepted by the CSS `border-style` property.
30
+
31
+ ### border-width
32
+
33
+ Border width of the video. The value must be a numerical value expressed in any unit.
34
+
35
+ ### object-fit
36
+
37
+ How the video fills its box. Values can include those accepted by the CSS `object-fit` property.
38
+
39
+ ### object-position
40
+
41
+ Position of the video inside its box. Values can include those accepted by the CSS `object-position` property.
42
+
43
+ ### max-height
44
+
45
+ Maximum height of the video. The value must be a numerical value expressed in any unit.
46
+
47
+ ### min-height
48
+
49
+ Minimum height of the video. The value must be a numerical value expressed in any unit.
50
+
51
+ ### max-width
52
+
53
+ Maximum width of the video. The value must be a numerical value expressed in any unit.
54
+
55
+ ### min-width
56
+
57
+ Minimum width of the video. The value must be a numerical value expressed in any unit.
58
+
59
+ ### caption
60
+
61
+ Font styles for the video caption (`<figcaption>`). Accepts all the text-related options listed [here](../properties/Font.md).
62
+
7
63
  ### margin-bottom
8
64
 
9
- This property sets the margin-bottom of the video.
65
+ This property sets the margin-bottom of the video block.
10
66
 
11
67
  The value must be a numerical value expressed in any unit.
12
68
 
13
-
14
69
  ## SCSS
15
70
 
16
71
  ```scss
17
- .c--content-X {
18
- @include make-content-modifier (
19
- $video-options: (
20
- "margin-bottom": $measure*4,
21
- )
22
- );
23
- }
24
- ```
72
+ .c--content-X {
73
+ @include make-content-modifier(
74
+ $video-options: (
75
+ "border-color": red,
76
+ "border-radius": 20px,
77
+ "border-style": solid,
78
+ "border-width": 2px,
79
+ "object-fit": cover,
80
+ "object-position": center,
81
+ "max-height": 700px,
82
+ "min-height": 0,
83
+ "max-width": 100%,
84
+ "min-width": 30px,
85
+ "caption": (
86
+ "className": f--font-f,
87
+ "text-align": right,
88
+ ),
89
+ "margin-bottom": $measure * 5,
90
+ )
91
+ );
92
+ }
93
+ ```
@@ -0,0 +1,74 @@
1
+ # Background Options
2
+
3
+ These properties are used to style the background of the blocks: a background color, a background image (with its size/position/repeat) and an optional `overlay` layer painted on top of the image to keep the content readable.
4
+
5
+ ## Editable Variables
6
+
7
+ ### background-color
8
+
9
+ Sets the background color of the block.
10
+
11
+ Possible values include:
12
+
13
+ - Transparent (transparent)
14
+ - Color name (red)
15
+ - Hexadecimal color (#ffffff)
16
+ - RGB color (rgb(255, 255, 255))
17
+ - RGBA color (rgba(255, 255, 255, .5))
18
+ - A variable referencing any of the above options ($color-a)
19
+ - A color within a variable map (map.get($color-options, a))
20
+
21
+ ### background-image
22
+
23
+ Sets the background image of the block.
24
+
25
+ The value accepts any valid CSS `background-image` value, for example:
26
+
27
+ - A url (url("/images/bg.jpg"))
28
+ - A gradient (linear-gradient(...))
29
+ - A variable referencing any of the above options ($bg)
30
+
31
+ ### background-size
32
+
33
+ Sets the background-size of the block (cover, contain, auto, 100% 100%, etc.).
34
+
35
+ ### background-position
36
+
37
+ Sets the background-position of the block (center, top left, 50% 50%, etc.).
38
+
39
+ ### background-repeat
40
+
41
+ Sets the background-repeat of the block (no-repeat, repeat, repeat-x, etc.).
42
+
43
+ ### overlay
44
+
45
+ Adds a color/gradient layer on top of the background image to keep the content readable.
46
+
47
+ It is rendered as a `::before` pseudo-element covering the block, behind its content (the block's direct children are automatically raised above it). The layer inherits the block's `border-radius`.
48
+
49
+ The value accepts any valid CSS `background` value, for example:
50
+
51
+ - A semi-transparent color (rgba(0, 0, 0, 0.55))
52
+ - A gradient (linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2)))
53
+ - A variable referencing any of the above options ($overlay)
54
+
55
+ When you use an `overlay`, remember to set a light text `color` on the block's content so it contrasts against the layer.
56
+
57
+ ## SCSS
58
+
59
+ ```scss
60
+ .c--content-X {
61
+ @include make-content-modifier(
62
+ $quote-options: (
63
+ "background": (
64
+ "background-color": #1a1a1a,
65
+ "background-image": url("/images/bg.jpg"),
66
+ "background-size": cover,
67
+ "background-position": center,
68
+ "background-repeat": no-repeat,
69
+ "overlay": linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
70
+ ),
71
+ )
72
+ );
73
+ }
74
+ ```
@@ -122,6 +122,20 @@ This property sets the weight of the font when we set it to bold in the backend.
122
122
 
123
123
  Values can include those accepted by the CSS 'font-weight' property.
124
124
 
125
+ ### bold-color
126
+
127
+ This property sets the color of the text when we set it to bold in the backend (the `<strong>` / `<b>` tags), independently of the regular text color.
128
+
129
+ Possible values include:
130
+
131
+ - Transparent (transparent)
132
+ - Color name (red)
133
+ - Hexadecimal color (#ffffff)
134
+ - RGB color (rgb(255, 255, 255))
135
+ - RGBA color (rgba(255, 255, 255, .5))
136
+ - A variable referencing any of the above options ($color-a)
137
+ - A color within a variable map (map.get($color-options, a))
138
+
125
139
  ## SCSS
126
140
 
127
141
  ```scss
@@ -145,6 +159,7 @@ Values can include those accepted by the CSS 'font-weight' property.
145
159
  "padding-top": 8px,
146
160
  "text-align": center,
147
161
  "bold-font-weight": 800,
162
+ "bold-color": red,
148
163
  )
149
164
  );
150
165
  }
@@ -0,0 +1,33 @@
1
+ # Media Options
2
+
3
+ These are the shared options used by the media blocks: [Image](../blocks/Image.md) and [Video](../blocks/Video.md). They style the media element (`<img>`, `<iframe>`, `<video>`), its caption and its spacing.
4
+
5
+ ## Editable options
6
+
7
+ ### border-color / border-radius / border-style / border-width
8
+
9
+ Border of the media element. They accept the [Border](./Border.md) values (color, radius, style, width).
10
+
11
+ ### object-fit
12
+
13
+ How the media fills its box. Values can include those accepted by the CSS `object-fit` property.
14
+
15
+ ### object-position
16
+
17
+ Position of the media inside its box. Values can include those accepted by the CSS `object-position` property.
18
+
19
+ ### max-height / min-height / max-width / min-width
20
+
21
+ Size constraints of the media element. The value must be a numerical value expressed in any unit.
22
+
23
+ ### caption
24
+
25
+ Font styles for the media caption (`<figcaption>`). Accepts all the text-related options listed in [Font](./Font.md).
26
+
27
+ ### margin-bottom
28
+
29
+ Margin-bottom of the media block. The value must be a numerical value expressed in any unit.
30
+
31
+ ### zoom-button-background-color / zoom-button-bottom / zoom-button-right / zoom-button-border-radius
32
+
33
+ **Image only (Gutenberg).** Style the lightbox/zoom trigger button shown over an image. They have no effect on videos (a video has no zoom button). See [Image](../blocks/Image.md) for details.
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
2
+ <path d="M5 12h14M13 6l6 6-6 6" stroke="#8c6ba8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -1,4 +1,5 @@
1
- $base-path: "/wordpress-starter/" !default;
1
+ // Sin barra final: el separador lo añade asset-url() para evitar dobles "//".
2
+ $base-path: "/wordpress-starter" !default;
2
3
 
3
4
  @function asset-url($path) {
4
5
  @return "#{$base-path}/#{$path}";