mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Convert docs to docsy
This commit is contained in:
21
site/themes/docsy/assets/scss/support/_functions.scss
Normal file
21
site/themes/docsy/assets/scss/support/_functions.scss
Normal file
@@ -0,0 +1,21 @@
|
||||
// Common functions.
|
||||
|
||||
@function prepend($list, $value) {
|
||||
@return join($value, $list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// See https://www.sitepoint.com/using-sass-build-color-palettes/
|
||||
@function color-diff($a, $b) {
|
||||
$sat: saturation($a) - saturation($b);
|
||||
$lig: lightness($a) - lightness($b);
|
||||
$fn-sat: if($sat > 0, 'desaturate', 'saturate');
|
||||
$fn-lig: if($lig > 0, 'darken', 'lighten');
|
||||
|
||||
@return (
|
||||
adjust-hue: -(hue($a) - hue($b)),
|
||||
#{$fn-sat}: abs($sat),
|
||||
#{$fn-lig}: abs($lig)
|
||||
);
|
||||
}
|
||||
45
site/themes/docsy/assets/scss/support/_mixins.scss
Normal file
45
site/themes/docsy/assets/scss/support/_mixins.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
// Some simple mixins.
|
||||
|
||||
@mixin bg-gradient-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin link-variant($parent, $color, $hover-color, $underline: false) {
|
||||
#{$parent} {
|
||||
color: $color;
|
||||
|
||||
@if $underline {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin optional-at-root($sel) {
|
||||
@at-root #{if(not &, $sel, selector-append(&, $sel))} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
// placeholder allows styling of the placeholder used in search input etc.
|
||||
@mixin placeholder {
|
||||
@include optional-at-root("::-webkit-input-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root(":-moz-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root("::-moz-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root(":-ms-input-placeholder") {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
82
site/themes/docsy/assets/scss/support/_utilities.scss
Normal file
82
site/themes/docsy/assets/scss/support/_utilities.scss
Normal file
@@ -0,0 +1,82 @@
|
||||
// Mixins
|
||||
|
||||
@mixin optional-at-root($sel) {
|
||||
@at-root #{if(not &, $sel, selector-append(&, $sel))} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin placeholder {
|
||||
@include optional-at-root("::-webkit-input-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root(":-moz-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root("::-moz-placeholder") {
|
||||
@content;
|
||||
}
|
||||
|
||||
|
||||
@include optional-at-root(":-ms-input-placeholder") {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
// Common util classes.
|
||||
|
||||
.td-border-top {
|
||||
border: none;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.td-border-none {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.td-block-padding {
|
||||
padding-top: $td-block-space-top-base ;
|
||||
padding-bottom: $td-block-space-bottom-base;
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
padding-top: $td-block-space-top-base * 1.25;
|
||||
padding-bottom: $td-block-space-bottom-base * 1.25;
|
||||
}
|
||||
}
|
||||
|
||||
.td-overlay {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&--dark::after {
|
||||
background-color: rgba($dark, 0.3);
|
||||
}
|
||||
|
||||
&--light::after {
|
||||
background-color: rgba($light, 0.3);
|
||||
}
|
||||
|
||||
&__inner {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.td-max-width-on-larger-screens {
|
||||
@include media-breakpoint-up(lg) {
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user