Skip to content

Commit 58e794d

Browse files
committed
build: update scripts
1 parent 05aac54 commit 58e794d

File tree

4 files changed

+27
-38
lines changed

4 files changed

+27
-38
lines changed

docs/assets/scss/_colors.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
}
4242

4343
// stylelint-disable declaration-block-single-line-max-declarations
44+
4445
.docs-blue-100 { color: color-contrast($blue-100); background-color: $blue-100; }
4546
.docs-blue-200 { color: color-contrast($blue-200); background-color: $blue-200; }
4647
.docs-blue-300 { color: color-contrast($blue-300); background-color: $blue-300; }

docs/assets/scss/_component-examples.scss

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
// Docs examples
33
//
44

5-
.docs-example-snippet {
5+
.docs-code-snippet {
6+
margin: 0 ($cd-gutter-x * -.5) 1rem;
67
border: solid var(--cui-border-color);
78
border-width: 1px 0;
89

910
@include media-breakpoint-up(md) {
11+
margin-right: 0;
12+
margin-left: 0;
1013
border-width: 1px;
14+
@include border-radius(var(--cui-border-radius));
1115
}
1216
}
1317

@@ -16,7 +20,7 @@
1620

1721
position: relative;
1822
padding: var(--cd-example-padding);
19-
margin: 0 ($cd-gutter-x * -.5);
23+
margin: 0 ($cd-gutter-x * -.5) 1rem;
2024
border: solid var(--cui-border-color);
2125
border-width: 1px 0;
2226
@include clearfix();
@@ -27,13 +31,7 @@
2731
margin-right: 0;
2832
margin-left: 0;
2933
border-width: 1px;
30-
@include border-top-radius(var(--cui-border-radius));
31-
}
32-
33-
+ .docs-code-snippet {
34-
@include border-top-radius(0);
35-
border: solid var(--cui-border-color);
36-
border-width: 0 1px 1px;
34+
@include border-radius(var(--cui-border-radius));
3735
}
3836

3937
+ p {
@@ -350,12 +348,17 @@
350348
.highlight {
351349
position: relative;
352350
padding: .75rem ($cd-gutter-x * .5);
353-
margin-bottom: 1rem;
354351
background-color: var(--cd-pre-bg);
355352

356353
@include media-breakpoint-up(md) {
357354
padding: .75rem 1.25rem;
358-
@include border-radius(var(--cui-border-radius));
355+
@include border-radius(calc(var(--cui-border-radius) - 1px));
356+
}
357+
358+
@include media-breakpoint-up(lg) {
359+
pre {
360+
margin-right: 1.875rem;
361+
}
359362
}
360363

361364
pre {
@@ -376,35 +379,22 @@
376379
}
377380
}
378381

379-
.docs-code-snippet {
380-
margin: 0 ($cd-gutter-x * -.5) $spacer;
381-
382-
.highlight {
383-
margin-bottom: 0;
384-
}
382+
.highlight-toolbar {
383+
background-color: var(--cd-pre-bg);
385384

386-
.docs-example ~ .highlight {
385+
+ .highlight {
387386
@include border-top-radius(0);
388387
}
389-
390-
.docs-example {
391-
margin: 0;
392-
border: 0;
393-
}
394-
395-
@include media-breakpoint-up(md) {
396-
margin-right: 0;
397-
margin-left: 0;
398-
@include border-radius($border-radius);
399-
}
400388
}
401389

402-
.highlight-toolbar {
403-
background-color: var(--cd-pre-bg);
404-
}
405-
406-
.docs-scss-docs {
390+
.docs-file-ref {
407391
.highlight-toolbar {
408-
@include border-top-radius(calc(var(--cui-border-radius) + 1px));
392+
@include media-breakpoint-up(md) {
393+
@include border-top-radius(calc(var(--cui-border-radius) - 1px));
394+
}
409395
}
410396
}
397+
398+
.docs-content .docs-code-snippet {
399+
margin-bottom: 1rem;
400+
}

docs/assets/scss/_variables.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// stylelint-disable scss/dollar-variable-default
2-
31
// Local docs variables
42
$cd-purple: #4c0bce;
53
$cd-violet: lighten(saturate($cd-purple, 5%), 15%); // stylelint-disable-line function-disallowed-list

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"docs-serve": "hugo server --port 9001 --disableFastRender --printUnusedTemplates",
5858
"docs-serve-only": "npx sirv-cli _gh_pages --port 9001",
5959
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
60-
"update-deps": "ncu -u -x globby,karma-browserstack-launcher,karma-rollup-preprocessor,terser && echo Manually update docs/assets/js/vendor",
60+
"update-deps": "ncu -u -x globby,jasmine,karma-browserstack-launcher,karma-rollup-preprocessor,terser && echo Manually update docs/assets/js/vendor",
6161
"release": "npm-run-all dist release-sri docs-build release-zip*",
6262
"release-sri": "node build/generate-sri.js",
6363
"release-version": "node build/change-version.js",

0 commit comments

Comments
 (0)