@total_onion/onion-library 1.0.84 → 1.0.86
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/components/component-athena-head-v3/athena-head-v3.twig +4 -0
- package/components/component-content-container-settings-v3/content-container-settings-v3.scss +16 -17
- package/components/component-gradient-overlay-v3/gradient-overlay-v3.scss +45 -0
- package/components/fields-block-editor-assets-v3/block-editor-assets-v3.php +17 -0
- package/components/fields-core-critical-v3/core-critical-v3.scss +1 -0
- package/components/fields-core-design-settings-v3/core-design-settings-v3.twig +6 -0
- package/components/fields-core-design-system-v3/core-design-system-v3.php +44 -0
- package/components/fields-core-typography-v3/core-typography-v3.scss +611 -609
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.scss +11 -7
- package/components/fields-typography-settings-v3/group_6876149264002.json +6177 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{{ include('components/noscript.twig', ignore_missing = true) }}
|
|
2
|
+
{{ include('components/core-design-settings-v3.twig', ignore_missing = true) }}
|
|
3
|
+
{{ include('components/speculation-api.twig', ignore_missing = true) }}
|
|
4
|
+
{{ include('components/global-preload.twig', ignore_missing = true) }}
|
package/components/component-content-container-settings-v3/content-container-settings-v3.scss
CHANGED
|
@@ -154,27 +154,26 @@
|
|
|
154
154
|
'static'
|
|
155
155
|
)
|
|
156
156
|
var(--text-stroke-colour);
|
|
157
|
+
&:last-child {
|
|
158
|
+
margin-bottom: 0;
|
|
159
|
+
}
|
|
157
160
|
@include core-mixins-v3.defaultThemeTextColours();
|
|
158
161
|
@include core-mixins-v3.defaultTextTransform();
|
|
159
162
|
@include core-mixins-v3.defaultTextAlign();
|
|
160
163
|
@include core-mixins-v3.responsiveShowHide();
|
|
161
|
-
p,
|
|
162
|
-
h1,
|
|
163
|
-
h2,
|
|
164
|
-
h3,
|
|
165
|
-
h4,
|
|
166
|
-
h5,
|
|
167
|
-
h6,
|
|
168
|
-
a,
|
|
169
|
-
li,
|
|
170
|
-
div {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:last-child {
|
|
176
|
-
margin-bottom: 0;
|
|
177
|
-
}
|
|
164
|
+
// p,
|
|
165
|
+
// h1,
|
|
166
|
+
// h2,
|
|
167
|
+
// h3,
|
|
168
|
+
// h4,
|
|
169
|
+
// h5,
|
|
170
|
+
// h6,
|
|
171
|
+
// a,
|
|
172
|
+
// li,
|
|
173
|
+
// div {
|
|
174
|
+
// @include core-mixins-v3.defaultFontWeight();
|
|
175
|
+
// @include core-mixins-v3.defaultFontStyle();
|
|
176
|
+
// }
|
|
178
177
|
|
|
179
178
|
@include core-mixins-v3.device(breakpoints.$tabPortrait) {
|
|
180
179
|
max-width: var(--wysiwyg-max-width-portrait);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// LIBRARY FILE - Do not modify/override here as your changes will be lost when the package is updated.
|
|
2
|
+
// This is the new version the older mixins should be removed and the blocks use Gradient Overlay mixin instead
|
|
3
|
+
@mixin gradientOverlay() {
|
|
4
|
+
--spread: calc(100% - var(--gradient-spread));
|
|
5
|
+
&__gradient-overlay-element {
|
|
6
|
+
position: absolute;
|
|
7
|
+
inset: 0;
|
|
8
|
+
z-index: var(--gradient-zindex);
|
|
9
|
+
grid-area: var(--gradient-grid-area);
|
|
10
|
+
&::before,
|
|
11
|
+
&:after {
|
|
12
|
+
content: '';
|
|
13
|
+
pointer-events: none;
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
opacity: var(--gradient-opacity);
|
|
17
|
+
}
|
|
18
|
+
&::before {
|
|
19
|
+
background: linear-gradient(
|
|
20
|
+
var(--gradient-origin-before),
|
|
21
|
+
rgba(255, 255, 255, 0) 0%,
|
|
22
|
+
rgba(255, 255, 255, 0)
|
|
23
|
+
calc(var(--spread) - var(--gradient-amount)),
|
|
24
|
+
var(--gradient-colour) calc(100% - var(--gradient-amount))
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
&::after {
|
|
28
|
+
content: var(--enable-after);
|
|
29
|
+
background: linear-gradient(
|
|
30
|
+
var(--gradient-origin-after),
|
|
31
|
+
rgba(255, 255, 255, 0) 0%,
|
|
32
|
+
rgba(255, 255, 255, 0)
|
|
33
|
+
calc(var(--spread) - var(--gradient-amount)),
|
|
34
|
+
var(--gradient-colour) calc(100% - var(--gradient-amount))
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
&__blur-overlay-element {
|
|
39
|
+
background: var(--blur-colour);
|
|
40
|
+
backdrop-filter: blur(var(--blur-value));
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset: 0;
|
|
43
|
+
z-index: var(--blur-zindex);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
add_action('enqueue_block_assets', 'add_block_editor_assets_v3', 10, true);
|
|
3
|
+
function add_block_editor_assets_v3(): void
|
|
4
|
+
{
|
|
5
|
+
if (is_admin()) {
|
|
6
|
+
wp_enqueue_style('core-wordpress-block-editor-previews', gtp_get_asset_uri('corewordpressblockeditorpreviewcss.css'), array(), null);
|
|
7
|
+
wp_enqueue_script('editorstyles', gtp_get_asset_uri('corewordpressblockeditorpreview.js'), array(), null, true);
|
|
8
|
+
wp_localize_script('editorstyles', 'previewvars', core_design_system());
|
|
9
|
+
wp_localize_script('editorstyles', 'corecta', core_cta());
|
|
10
|
+
wp_localize_script('editorstyles', 'coretypography', core_typography_v3());
|
|
11
|
+
wp_localize_script('editorstyles', 'corefontmodifiers', core_font_modifiers());
|
|
12
|
+
wp_localize_script('editorstyles', 'ctastylenames', []);
|
|
13
|
+
wp_localize_script('editorstyles', 'themenames', []);
|
|
14
|
+
wp_localize_script('editorstyles', 'corethemes', core_themes());
|
|
15
|
+
wp_localize_script('editorstyles', 'colourconfig', create_colour_data());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
@use 'Assets/scss/modules/library-modules/core-typography-v3/core-typography-v3';
|
|
5
5
|
@use 'Assets/scss/modules/library-modules/core-generic-v3/core-generic-v3';
|
|
6
6
|
@use 'Assets/scss/modules/library-modules/core-css-modules-v3/core-css-modules-v3';
|
|
7
|
+
@include core-typography-v3.core-typography-v3();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
// @codingStandardsIgnoreStart
|
|
3
|
+
function core_design_system_v3()
|
|
4
|
+
{
|
|
5
|
+
$output = '';
|
|
6
|
+
$current_post = [];
|
|
7
|
+
if (isset($GLOBALS['post'])) {
|
|
8
|
+
$current_post = Timber::get_post($GLOBALS['post']->ID);
|
|
9
|
+
}
|
|
10
|
+
if (defined('GLOBAL_SETTINGS') && is_array(GLOBAL_SETTINGS)) {
|
|
11
|
+
$options = GLOBAL_SETTINGS;
|
|
12
|
+
if ($options) {
|
|
13
|
+
$output = '
|
|
14
|
+
<style id="core-design-system">
|
|
15
|
+
:root {
|
|
16
|
+
--mobile-inline:' . ($options['mobile_inline'] ?? 0) . ';
|
|
17
|
+
--portrait-inline:' . ($options['portrait_inline'] ?? 0) . ';
|
|
18
|
+
--landscape-inline:' . ($options['landscape_inline'] ?? 0) . ';
|
|
19
|
+
--desktop-inline:' . ($options['desktop_inline'] ?? 0) . ';
|
|
20
|
+
--screen-width-fullhd:' . ($options['screen_width_full_hd'] ?? 1920) . ';
|
|
21
|
+
--font-reference-fullhd:' . ($options['font_reference_full_hd'] ?? 1920) . ';
|
|
22
|
+
--screen-width-desktop:' . ($options['screen_width_desktop'] ?? 1440) . ';
|
|
23
|
+
--font-reference-desktop:' . ($options['font_reference_desktop'] ?? 1440) . ';
|
|
24
|
+
--screen-width-landscape:' . ($options['screen_width_landscape'] ?? 1024) . ';
|
|
25
|
+
--font-reference-landscape:' . ($options['font_reference_landscape'] ?? 1024) . ';
|
|
26
|
+
--screen-width-portrait:' . ($options['screen_width_portrait'] ?? 768) . ';
|
|
27
|
+
--font-reference-portrait:' . ($options['font_reference_portrait'] ?? 768) . ';
|
|
28
|
+
--font-reference-mobile:' . ($options['font_reference_mobile'] ?? 375) . ';
|
|
29
|
+
--screen-width-mobile:' . ($options['screen_width_mobile'] ?? 375) . ';
|
|
30
|
+
--screen-width-static:' . ($options['desktop_design_reference'] ?? 1920) . 'px;
|
|
31
|
+
--fullhd-design-reference:' . ($options['full_hd_design_reference'] ?? 1920) . ';
|
|
32
|
+
--desktop-design-reference:' . ($options['desktop_design_reference'] ?? 1440) . ';
|
|
33
|
+
--landscape-design-reference:' . ($options['landscape_design_reference'] ?? 1024) . ';
|
|
34
|
+
--portrait-design-reference:' . ($options['portrait_design_reference'] ?? 1024) . ';
|
|
35
|
+
--mobile-design-reference:' . ($options['mobile_design_reference'] ?? 1024) . ';
|
|
36
|
+
--global-content-max-width-setting:' . ($options['global_content_max_width_setting'] ?? 1024) . ';
|
|
37
|
+
--post-colour:' . ($current_post && (property_exists($current_post, 'meta') && isset($current_post->meta['post_colour'])) ? $current_post->meta['post_colour'] : '') . ';
|
|
38
|
+
--post-text-colour-style:' . ($current_post && (property_exists($current_post, 'meta') && isset($current_post->meta['post_text_colour_style'])) ? remove_underscore($current_post->meta['post_text_colour_style']) : '') . ';
|
|
39
|
+
}</style>';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return [$output];
|
|
43
|
+
} // END function core_design_vars
|
|
44
|
+
// @codingStandardsIgnoreEnd
|