9.1 #Mixins.duk-animation--grow duk-animation-grow
Add keyframes for a grow element.
scss/tools/_animation.scss
, line 16
9.2 #Mixins.duk-animation--line-loader duk-animation--line-loader
Add keyframes for a Youtube style "line-loader".
scss/tools/_animation.scss
, line 28
9.3 #Mixins.duk-animation--spin duk-animation--spin
Add keyframes for a spinning element.
scss/tools/_animation.scss
, line 4
9.4 #Mixins.duk-at-breakpoint duk-at-breakpoint
A wrapper for state based breakpoints.
Use state based breakpoints to normalise a state rather than a size. Example Update $duk-base-breakpoint-states to include states where a number of things might change. Eg. desktop-header, sidebar-visible, etc. This means you can easily change when that state occurs.
-
$name
Breakpoint name -
$breakpoints
Breakpoint map
scss/tools/_breakpoint.scss
, line 18
9.5 #Mixins.duk-bg-color duk-bg-color
Set a background color from $duk-bg-colors
.
-
$color-name
The key that represents the color in the color map. -
$bg-colors
A map of the background colors.
scss/tools/_background.scss
, line 18
9.6 #Mixins.duk-bg-color-alpha duk-bg-color-alpha
Set a background color alpha from $duk-bg-colors
.
-
$color-name
The key that represents the color in the color map. -
$alpha
Transparency value in percent 100% is opaque 0% is transparent. -
$bg-colors
A map of the background colors.
scss/tools/_background.scss
, line 30
9.7 #Mixins.duk-bg-scale-crop duk-bg-scale-crop
Add properties to compliment a background image that is using a CSS scale and crop.
It sets disables repeat, sets position to centered and background size is cover.
Width and height of the image needs to be managed elsewhere. Or via duk-responsive-aspect-ratio()
.
-
$image
Optional image url.
scss/tools/_background.scss
, line 43
9.8 #Mixins.duk-blockquote duk-blockquote
Block quote text helper. Provides a nice default style for block quotes.
-
$color-key
Text and border color. see$duk-font-colors
-
$gutter
Vertical margin and left padding applied.
scss/tools/_typography.scss
, line 200
9.9 #Mixins.duk-border-color duk-border-color
Set a border color from $duk-border-colors
.
-
$color-name
The key that represents the color in the color map. -
$border-colors
A map of the border colors.
scss/tools/_border.scss
, line 34
9.10 #Mixins.duk-border-color-alpha duk-border-color-alpha
Set a border color alpha from $duk-border-colors
.
-
$color-name
The key that represents the color in the color map. -
$alpha
Transparency value in percent 100% is opaque 0% is transparent. -
$border-colors
A map of the border colors.
scss/tools/_border.scss
, line 46
9.11 #Mixins.duk-border-radius duk-border-radius
Set a border radius from $duk-border-radii
to apply rounded corners.
-
$radius-type
The key that represents the radius in the radius map. -
$direction
applies effect to selected corners. Accepted options: 'all', 'top', 'bottom', 'left', 'right' -
$border-radii
A map of the border radii.
scss/tools/_border.scss
, line 71
9.18 #Mixins.duk-clearfix duk-clearfix
Clear floats in an element.
scss/tools/_clearfix.scss
, line 4
9.19 #Mixins.duk-container duk-container
Creates a container with constraints.
-
$size-name
The key that represents the size in the container map. -
$container-sizes
A map of the container sizes.
scss/tools/_layout.scss
, line 6
9.20 #Mixins.duk-feature-detect--msie duk-feature-detect--msie
This targets IE10+ browsers via feature detection with -ms-high-contrast
scss/tools/_feature-detect.scss
, line 6
9.21 #Mixins.duk-flex-grid duk-flex-grid
Wrapper that contains grid items
scss/tools/_flex-grid.scss
, line 4
9.22 #Mixins.duk-flex-grid-col-count duk-flex-grid-col-count
Define the column count in a grid. Applies to grid item.
-
$columns
The count of columns -
$gutter
The horizontal gutter between grid items (default 1.5%).
scss/tools/_flex-grid.scss
, line 15
9.23 #Mixins.duk-flex-grid-gutter duk-flex-grid-gutter
Adds a gutter to each column in a flex grid whilst ensuring the edges of the grid are not indented.
It does this by setting a negative margin on parent to offset the grid item padding. Using the $gutter
on
duk-flex-grid-col-count
is a better way to achieve this.
-
$gutter-size
The size of the gutter. -
$child-selector
The selector for the grid columns.
scss/tools/_flex-grid.scss
, line 59
9.24 #Mixins.duk-flex-grid-responsive duk-flex-grid-responsive
Responsive Flex grid. Should be applied to the direct wrapper of the grid columns. Example:
ul {
@include duk-flex-grid-responsive((small: 1, medium: 2, large: 3));
}
-
$grid-map
A SASS map with the keys defining the breakpoint and the values defining the column count. Eg. (medium: 2, large: 3, x-large: 4) -
$gutter
Gutter applied between grid items (default 1.5%).
scss/tools/_flex-grid.scss
, line 28
9.25 #Mixins.duk-flyout duk-flyout
Flyout wrapper. Flyouts are pieces of content that fly out of a parent when said parent is hovered.
NOTE: Consider touch screens where this becomes quite useless.
-
$flyout-content-selector
The selector of the child content element -
$direction
Where the flyout appears. top, bottom, left, right (default is bottom).
scss/tools/_flyout.scss
, line 7
9.26 #Mixins.duk-font-color duk-font-color
Set a font color from $duk-base-font-sizes.
-
$color-name
The key that represents the color in the color map. -
$important
Should be !important true/false (defaults to false). -
$font-colors
A map of the font colors.
scss/tools/_typography.scss
, line 84
9.27 #Mixins.duk-font-include duk-font-include($var)
Import an external font or load a map of local font-face variants.
$font-variants: (
'tt_commons': (
path : '../../fonts/tt_commons',
formats: ('woff', 'woff2', 'eot'),
variants: (
('tt_commons_regular-webfont', 400, normal),
('tt_commons_medium-webfont', 500, normal),
('tt_commons_bold-webfont', 700, normal),
),
),
);
@include duk-font-include('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;900&display=swap');
@include duk-font-include($font-variants)
-
$var
An external resource to import (eg: google font).
A map of font variants.
scss/tools/_typography.scss
, line 142
9.28 #Mixins.duk-font-load duk-font-load
Include a font face.
-
$name
The name of the font family. -
$path
Path of the font folder. -
$filename
Filename for the font, expects 3 files with extensions: eot, woff, ttf. -
$weight
Weight of the font face (default normal). -
$style
Style of the font. Eg normal, italic (default normal). -
$formats
A map of font extensions and their format value.
scss/tools/_typography.scss
, line 102
9.29 #Mixins.duk-font-size duk-font-size
Set a font size and line height from $duk-base-font-sizes.
-
$size
The key that represents the size in the sizes map. -
$font-sizes
A map of the font sizes. Each value contains a map withsize
andheight
.
scss/tools/_typography.scss
, line 47
9.30 #Mixins.duk-font-weight duk-font-weight
Set a font weight from $duk-base-font-weights
-
$weight
The key that represents the font weight. -
$font-weights
A map of the font weights.
scss/tools/_typography.scss
, line 60
9.31 #Mixins.duk-form-element-large duk-form-element-large
Large form elements such as textareas and multiple select.
Example making all form controls have red text:
@include duk-form-element-large { color: red; }
scss/tools/_form.scss
, line 40
9.32 #Mixins.duk-form-element-text duk-form-element-text
Form element base. Includes select, textarea and all text fields.
Example making all form controls have red text:
@include duk-form-element-text { color: red; }
scss/tools/_form.scss
, line 6
9.33 #Mixins.duk-form-normalize duk-form-normalize
Normalize form elements so a base form both looks not bad and is consistent between browsers.
-
$element-settings
Settings for a base form element, applied viaduk-form-element-text()
scss/tools/_form.scss
, line 58
9.34 #Mixins.duk-gutter-horizontal duk-gutter-horizontal
Apply a gutter to the left and right.
-
$size
Size of the gutter. -
$type
Is the gutter 'margin' or 'padding' (default margin)
scss/tools/_gutter.scss
, line 26
9.35 #Mixins.duk-gutter-responsive duk-gutter-responsive
Apply a responsive gutter based on a map.
Gutters generally should be responsive as you want more whitespace on larger screens. This mixin allows you to add a gutter per breakpoint via a map so the gutter can grow with screen size.
-
$gutter-map
The map of breakpoints to gutter size. Eg (small: 10px, large: 15px, xx-large: 30px). Usesduk-susy-breakpoint
. -
$direction
Is gutter 'vertical' or 'horizontal' -
$type
Is the gutter 'margin' or 'padding'
scss/tools/_gutter.scss
, line 45
9.36 #Mixins.duk-gutter-vertical duk-gutter-vertical
Apply a gutter to the top and bottom.
-
$size
Size of the gutter. -
$type
Is the gutter 'margin' or 'padding' (default margin)
scss/tools/_gutter.scss
, line 7
9.37 #Mixins.duk-heading duk-heading
Apply style to a single heading tag.
-
$tag
The heading tag to apply the style to
scss/tools/_typography.scss
, line 32
9.38 #Mixins.duk-headings duk-headings
Apply styles to all headings.
scss/tools/_typography.scss
, line 19
scss/tools/_typography.scss
, line 186
9.40 #Mixins.duk-icon duk-icon
Adds the css for a specific icon.
-
$icon-name
Name of the icon code. If ommited then icon font/size/etc is still returned. -
$set-name
Name of the set, (defaults toduk
) -
$pseudo
The pseudo selector, egbefore
/after
(defaults tobefore
)
scss/tools/_icon.scss
, line 57
9.41 #Mixins.duk-icon-font-load duk-icon-font-load
Adds the icon font-face to the css. Adding this means each page will load the icon font adding overhead, use sparingly.
-
$set-name
Name of the set, (defaults toduk
)
scss/tools/_icon.scss
, line 41
9.42 #Mixins.duk-icon-generate-classes duk-icon-generate-classes
Generates all icon css for a set. This generates a lot of classes.
-
$set-name
Name of the set, (defaults toduk
) -
$namespace
Prefix for icons generated (defaults toduk-
)
scss/tools/_icon.scss
, line 122
9.44 #Mixins.duk-loader--grow duk-spinner--grow
A spinning grow loader.
-
$size
The size of the spinner
scss/tools/_loader.scss
, line 22
9.45 #Mixins.duk-loader--line duk-spinner--line
A youtube style line loader.
-
$size
The height
scss/tools/_loader.scss
, line 40
9.46 #Mixins.duk-loader--spin duk-loader--spin
A spinning border loader.
-
$size
The size of the spinner
scss/tools/_loader.scss
, line 4
9.47 #Mixins.duk-message-base duk-message-base
Base for a message callout.
-
$gutter
message padding/margin bottom.
scss/tools/_messages.scss
, line 6
9.48 #Mixins.duk-message-colors duk-message-colors
Apply colors to a message callout.
-
$base-color
The base message color, seeduk-palette-element()
-
$link-color
The link color, seeduk-palette-font-color-state()
scss/tools/_messages.scss
, line 20
9.54 #Mixins.duk-overlay duk-overlay
Wrapper for overlay element
-
$overlay-area-selector
Selector to use for overlay content
scss/tools/_overlay.scss
, line 11
9.55 #Mixins.duk-overlay__area duk-overlay__area
Overlay area that displays on hover.
scss/tools/_overlay.scss
, line 30
9.56 #Mixins.duk-overlay__area-content duk-overlay__area-content
Overlay area content horizontally and vertically aligned.
scss/tools/_overlay.scss
, line 46
9.57 #Mixins.duk-palette-element duk-palette-element
Apply a palette to an element
This allows defining border/background/text colors by only providing a single color.
-
$base-color
Border color and if no background/font color set, will be the base for those colors. -
$background-color
Override the background color. If not set will use 10% lighter than border. -
$font-color
Override the font color. If not set will use 50% darker than border. -
$heading-color
Override the heading color. If not set will use 80% darker than border.
scss/tools/_palette.scss
, line 17
9.58 #Mixins.duk-palette-font-color-state duk-palette-font-color-state
Apply a palette to font color states. Ideal for links
-
$base-color
Font color, will be the base for those colors. -
$hover-color
Override the hover color. If not set will use 20% darker than base. -
$active-color
Override the active color. If not set will use 30% darker than base. -
$focus-color
Override the focus color. If not set will use 30% darker than base.
scss/tools/_palette.scss
, line 43
9.59 #Mixins.duk-position duk-position
This mixin provides an easy way to position an element.
Example:
Position an element absolutely 50% from the top and 1em from the left:
@include duk-position(absolute, top 50% left 1em);
This generates the CSS:
position: absolute;
top: 50%;
left: 1em;
-
$position
The type of positioning, e.g absolute, relative. -
$args
The direction and amount, e.g top1em left 5em
.
scss/tools/_position.scss
, line 8
9.60 #Mixins.duk-position-absolute duk-position-absolute
This mixin provides an easy way to absolutely position an element.
It is a wrapper for @mixin duk-position.
-
$args
The direction and amount, e.gtop 1em left 5em
.
scss/tools/_position.scss
, line 40
9.61 #Mixins.duk-position-fixed duk-position-fixed
This mixin provides an easy way to fixed position an element. It is a wrapper for @mixin duk-position.
-
$args
The direction and amount, e.gtop 1em left 5em
.
scss/tools/_position.scss
, line 64
9.62 #Mixins.duk-position-relative duk-position-relative
This mixin provides an easy way to relatively position an element.
It is a wrapper for @mixin duk-position
.
-
$args
The direction and amount, e.gtop 1em left 5em
.
scss/tools/_position.scss
, line 52
9.63 #Mixins.duk-progress-bar duk-progress-bar
A progress bar.
-
$size
The height of the -
$border-color
The color of the border. -
$color
The color of the progress bar (defaults tocurrentColor
). -
$bar-selector
The progress bar element (defaults to> *
).
scss/tools/_progress.scss
, line 4
9.64 #Mixins.duk-reset-appearance duk-reset-appearance
Reset appearance properties on an element.
scss/tools/_reset.scss
, line 26
9.65 #Mixins.duk-reset-edges duk-reset-edges
Reset all padding and margins to zero on an element.
scss/tools/_reset.scss
, line 4
9.66 #Mixins.duk-reset-list duk-reset-list
Reset padding, margin, list-style on a ordered/unordered list.
scss/tools/_reset.scss
, line 14
9.67 #Mixins.duk-responsive-aspect-ratio duk-responsive-aspect-ratio
Make and element that has a responsive aspect ratio (eg. square, 16:9). To create a square set x/y to 1.
-
$x
Horizontal aspect (integer) -
$y
Vertical aspect (integer) -
$content-selector
The child element that contains the content.
scss/tools/_responsive-aspect-ratio.scss
, line 6
9.68 #Mixins.duk-responsive-video-iframe duk-responsive-video-iframe
Make iframe videos responsive and retain a 16:9 aspect ratio
scss/tools/_responsive-aspect-ratio.scss
, line 31
9.69 #Mixins.duk-shadow duk-shadow
Return shadow style.
Example: @include duk-shadow('default', '0 0px 8px 0', 0.5);
-
$color-name
The key that represents the color in the color map. -
$size
The size of the shadow (defaults to 1px) -
$type
The type of shadow (defaults to solid). -
$shadow-colors
A map of the shadow colors.
scss/tools/_shadow.scss
, line 18
9.70 #Mixins.duk-shadow-style duk-shadow-style
Apply a shadow style from the shadow map.
Example: @include duk-shadow-style('1');
-
$style-name
The key that represents the style in the shadow map.
scss/tools/_shadow.scss
, line 34
9.74 #Mixins.duk-sr-only duk-sr-only
Hide an element but still make it available to screen readers.
scss/tools/_typography.scss
, line 219
9.75 #Mixins.duk-susy-breakpoint duk-breakpoint
This mixin acts as a wrapper for breakpoint()
.
-
$name
Breakpoint name -
$breakpoints
Breakpoint map
scss/tools/_breakpoint.scss
, line 4
9.76 #Mixins.duk-text-align-vertically duk-text-align-vertically
Align text vertically.
-
$direction
Direction eg left, right, center, justify
scss/tools/_text-align.scss
, line 4
9.76 #Mixins.duk-text-align-vertically duk-text-align-vertically
Align text vertically.
-
$direction
Direction eg top, bottom, middle
scss/tools/_text-align.scss
, line 15
9.77 #Mixins.duk-triangle duk-triangle
Create a CSS triangle
-
$direction
up, down, left, right -
$size
Size of the triangle -
$color
Color of the triangle -
$position
Optional position set usingduk-position-absolute()
scss/tools/_shape.scss
, line 16
9.78 #Mixins.duk-vertical-align-content duk-vertical-align-content
Vertical aligned child item inside duk-vertical-align-wrapper()
. Uses flexbox.
-
$direction
How to vertical align. Eg top, bottom, center
scss/tools/_vertical-align.scss
, line 15
9.79 #Mixins.duk-vertical-align-wrapper duk-vertical-align-wrapper
Prepare a wrapper to have its content vertically aligned. Uses flexbox.
scss/tools/_vertical-align.scss
, line 4
9.80 #Mixins.duk-wysiwyg-only duk-wysiwyg-only
Apply styles to the wysiwyg editor only. Currently only applies to ckeditor styles, update this mixin to suit other editors.
scss/tools/_wysiwyg.scss
, line 4
9.81 #Mixins.duk-z-index duk-z-index
Get a z-index from $duk-base-z-index
-
$z
The key that represents the z-index. -
$z-indexes
A map of the z indexes.
scss/tools/_position.scss
, line 76
scss/tools/_island.scss
, line 6