This is a stripped down and customized Bootstrap v5 variation with a refined set of styles and components. This module is used under the hood in our webshop . The module is refined for usage within Brixtol Textiles internal and public facing projects. This variation specifically is void of any components and mostly consists of the CSS logics.
This variation uses custom naming conventions for classes in order to keep production bundles small without needing to purge. The constant breaking changes of Bootstrap is problematic and in order to negate complaints this has evolved to become a single point of control which we can depend upon while still being able to extend the base to different requirements.
When using this variation you can either either leverage its defaults or create a per-project
strap.scss
file to overwrite defaults. This flavor of Bootstrap is intended to be bundled along side project specific stylings, so the defaults are completely stripped and largely refactored. The main
sass/*
directory contains all the overwrites and refactors, the
sass/bootstrap/*
directory contains the hard-fork of Bootstrap and the
_
prefixed files in the root of this directory are import facing.
responsive
*-xxs
*-xs
*-sm
*-md
*-lg
*-xl
*-xxl
<div class="row">
<div class="col-12 col-sm-10 col-md-8 col-lg-6 col-xl-3"></div>
</div>
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1400px
);
responsive
.col-auto
.col-1
.col-2
.col-3
.col-4
.col-4
.col-5
.col-6
.col-7
.col-8
.col-9
.col-10
.col-11
.col-12
.col
.flex
.flex-row
.flex-col
.flex-row-rev
.flex-col-rev
.jc-start
.jc-end
.jc-between
.jc-around
.jc-even
.ac-start
.ac-end
.ac-center
.ac-between
.ac-around
.ac-stretch
.as-auto
.as-start
.as-end
.as-center
.as-between
.as-stretch
.ai-start
.ai-end
.ai-center
.ai-base
.ai-stretch
<!-- Renders a border in gray -->
<div class="bd"></div>
<!-- Renders a border on the bottom in black -->
<div class="bb bc-black"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br bt"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br br-md-0 br-lg"></div>
<!-- Renders a .2rem thick border on the top in green -->
<div class="bt bw-2 bc-green"></div>
<!-- Renders a border on the right and left top in green -->
<div class="bl br bc-green"></div>
<!-- Renders a border in gray in mobileand desktop but not tablet -->
<div class="b b-sm-0 b-lg"></div>
/* -------------------------------------------- */
/* BORDER COLORS */
/* -------------------------------------------- */
$border-color: $gray-300;
$border-colors: (
black: $black,
white: $white,
red: $red,
gray: $gray-400,
green: $green
);
/* -------------------------------------------- */
/* BORDERS */
/* -------------------------------------------- */
$border-width: .07rem;
$border-style: solid;
$border-color-translucent: rgba($black, .175);
$border-widths: (
1: .1rem,
2: .2rem
);
responsive
!important
suffixes.
.p-*
.px-*
.py-*
.pl-*
.pt-*
.pr-*
.pb-*
.pl-*
.m-*
.mx-*
.my-*
.ml-*
.mt-*
.mr-*
.mb-*
.ml-*
.mx-*-auto
.my-*-auto
.mt-*-auto
.mr-*-auto
.mb-*-auto
.ml-*-auto
<!-- Renders a border in gray -->
<div class="bd"></div>
<!-- Renders a border on the bottom in black -->
<div class="bb bc-black"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br bt"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br br-md-0 br-lg"></div>
<!-- Renders a .2rem thick border on the top in green -->
<div class="bt bw-2 bc-green"></div>
<!-- Renders a border on the right and left top in green -->
<div class="bl br bc-green"></div>
<!-- Renders a border in gray in mobileand desktop but not tablet -->
<div class="b b-sm-0 b-lg"></div>
/* -------------------------------------------- */
/* BORDER COLORS */
/* -------------------------------------------- */
$border-color: $gray-300;
$border-colors: (
black: $black,
white: $white,
red: $red,
gray: $gray-400,
green: $green
);
/* -------------------------------------------- */
/* BORDERS */
/* -------------------------------------------- */
$border-width: .07rem;
$border-style: solid;
$border-color-translucent: rgba($black, .175);
$border-widths: (
1: .1rem,
2: .2rem
);
responsive
.d-none
.d-block
.d-unset
.d-flex
.d-grid
.d-inline
.d-flex-inline
.d-inline-block
.d-table
.d-table-row
.d-table-cell
<!-- Renders a border in gray -->
<div class="bd"></div>
<!-- Renders a border on the bottom in black -->
<div class="bb bc-black"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br bt"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br br-md-0 br-lg"></div>
<!-- Renders a .2rem thick border on the top in green -->
<div class="bt bw-2 bc-green"></div>
<!-- Renders a border on the right and left top in green -->
<div class="bl br bc-green"></div>
<!-- Renders a border in gray in mobileand desktop but not tablet -->
<div class="b b-sm-0 b-lg"></div>
/* -------------------------------------------- */
/* BORDER COLORS */
/* -------------------------------------------- */
$border-color: $gray-300;
$border-colors: (
black: $black,
white: $white,
red: $red,
gray: $gray-400,
green: $green
);
/* -------------------------------------------- */
/* BORDERS */
/* -------------------------------------------- */
$border-width: .07rem;
$border-style: solid;
$border-color-translucent: rgba($black, .175);
$border-widths: (
1: .1rem,
2: .2rem
);
responsive
font-family
.ff-head
.ff-body
.ff-code
<!-- Renders all text in base font-->
<p class="ff-base"></p>
<!-- Renders all text in heading font -->
<p class="ff-heading"></p>
<!-- Renders all text in code font -->
<p class="ff-code"></p>
/* -------------------------------------------- */
/* FONT FAMILY */
/* -------------------------------------------- */
$font-family-base: Helvetica, sans-serif;
$font-family-heading: Arial, sans-serif !default;
$font-family-code: SFMono-Regular, Menlo, Monaco, "Courier New", Courier, monospace;
// HEADINGS FONT FAMILY REFERENCES HEADING
//
$headings-font-family: $font-family-heading;
// BUTTON FONT FAMILY REFERENCES HEADING
//
$btn-font-family: $font-family-heading !default;
// INPUT FONT FAMILY REFERENCES HEADING
//
$input-font-family: $headings-font-family !default;
responsive
font-size
Medium (Base)
.
.fs-xs
.fs-sm
.fs
.fs-lg
.fs-xl
<!-- Renders all text is xs -->
<p class="fs-xs"></p>
<!-- Renders all text in xl -->
<p class="fs-xl"></p>
/* -------------------------------------------- */
/* FONT SIZES */
/* -------------------------------------------- */
$font-size-base: 1rem !default;
$font-size-xs: $font-size-base * .875 !default;
$font-size-sm: $font-size-base * .875 !default;
$font-size-lg: $font-size-base * 1.25 !default;
$font-size-xl: $font-size-base * 1.50 !default;
responsive
font-style
.normal
.italic
<!-- Makes the text italic -->
<p class="italic"></p>
<!-- Removes the italic style -->
<i class="normal"></i>
responsive
font-weight
.fw-thin
for the lightest possible weight, .fw-base
for the normal font weight and .fw-bold
for the thickest (or boldest) font weight.
.fw-thin
.fw-base
.fw-bold
<!-- Makes the text bold, ie: 600 -->
<p class="fw-bold"></p>
<!-- makes the text lightest, ie: 100 -->
<i class="fw-lighter"></i>
responsive
color
.fc-white
.fc-black
.fc-gray
.fc-pink
.fc-red
.fc-green
.fc-orange
<!-- Renders all text in black-->
<span class="fc-black"></span>
<!-- Renders all text in red -->
<span class="fc-red"></span>
<!-- Renders all text in gray -->
<span class="fc-gray"></span>
/* -------------------------------------------- */
/* FONT COLORS */
/* -------------------------------------------- */
$font-colors: (
"black": $black,
"white": $white,
"green": $green,
"gray": $gray-500,
"red": $red,
"orange": $orange
) !default;
responsive
text-align
.tl
.tc
.tr
.tj
<!-- Renders the text to left in mobile and center in tablet -->
<p class="tl tc-md"></p>
<!-- Renders the text to right in mobile, left in tablet and center in desktop -->
<p class="tr tl-md tc-lg"></p>
<!-- Render the text in the center always -->
<p class="tc"></p>
<!-- Removes text in a justified manner -->
<p class="tj"></p>
responsive
text-transform
.upper
.lower
.upcase
.uncase
<!-- Renders the text in UPPERCASE -->
<span class="upper"></span>
<!-- Renders the text in lowercase -->
<span class="lower"></span>
<!-- Makes the first letter Upcase -->
<span class="upcase"></span>
<!-- Removes any casing style -->
<span class="uncase"></span>
responsive
text-decoration
.underline
.strike
.undecorate
<!-- Renders the text with an underline -->
<span class="underline"></span>
<!-- Renders the text with an line through the middle -->
<span class="strike"></span>
<!-- Removes the underline -->
<a class="undecorate"></a>
// sass/_text.scss
$utilities: map-merge($utilities, (
"text-decoration": (
property: text-decoration,
class: null,
values: (
strike: line-through,
underline: underline,
undecorate: none
)
)
)
responsive
h1, h2, h3, h4, h5, h6
.h1
.h2
.h3
.h4
.h5
.h6
<!-- heading h1 -->
<h1></h1>
<!-- heading h2 -->
<h2></h2>
<!-- makes the h1 heading a h4 size -->
<h1 class="h4"></h1>
<!-- makes the h6 heading a h1 size -->
<h6 class="h1"></h6>
text-headings
$headings-letter-spacing: $letter-spacing-heading;
$headings-font-family: $font-family-heading;
$headings-margin-bottom: $spacer * .5;
$headings-font-style: null;
$headings-font-weight: 500;
$headings-line-height: 1.2;
$headings-color: null;
$headings-uppercase: true;
$h1-font-size: $font-size-base * 2.5;
$h2-font-size: $font-size-base * 2;
$h3-font-size: $font-size-base * 1.75;
$h4-font-size: $font-size-base * 1.5;
$h5-font-size: $font-size-base * 1.25;
$h6-font-size: $font-size-base;
responsive
style
background-image
properties. The icons are also available as CSS Variables and expose a value of url()
which can be used inline via style
attributes.
--svg-plus: url(...)
icon-plus($color: currentColor,$width: 1)
--svg-minus: url(...)
icon-minus($color: currentColor, $width: 1)
--svg-check: url(...)
icon-check($color: currentColor, $width: 1)
--svg-cross: url(...)
icon-cross($color: currentColor, $width: 1)
--svg-square: url(...)
icon-square($color: currentColor, $width: 1)
--svg-arrow: url(...)
icon-arrow($color: currentColor, $width: 1)
--svg-menu: url(...)
icon-menu($color: currentColor, $width: 1)
--svg-image: url(...)
icon-image($color: currentColor, $width: 1)
--svg-search: url(...)
icon-search($color: currentColor)
--svg-delete: url(...)
icon-delete($color: currentColor, $width: 1)
--svg-bell: url(...)
icon-bell($color: currentColor, $width: 1)
<!-- Rendering an Icon in markup can be done via style attribute -->
<div style="background-image: var(--svg-bell);"></div>
icon-plus($color: currentColor, $width: 1.5);
icon-minus($color: currentColor, $width: 1.5);
icon-check($color: currentColor, $width: 1.5);
icon-bell($color: currentColor, $width: 1.5);
// etc etc
responsive
img picture
.aspect-ratio
class. There are multiple ways to leverage this utility.
.ratio .700x1200
$aspect-ratio-bg-svg: url('*');
style="*"
attribute. We pass a CSS variable and
calc()
function which
will be digested by the
.ratio
class name. The
--ratio
variable requires height / width
calc(height / width)
<picture class="ratio" style="--ratio: calc(800 / 1240)">
<source srcset="*" media="*">
<img src="*">
</picture>
.ratio .no-placeholder
$aspect-ratio-bg-svg: null
<picture class="ratio no-placeholder">
</picture>
<!-- Aspect Ratio with Preset-->
<picture class="ratio ratio-720x1200">
<source srcset="*" media="*">
<source srcset="*" media="*">
<source srcset="*" media="*">
<img src="*">
</picture>
<!-- Aspect Ratio with CSS Variable -->
<picture class="ratio" style="--ratio: calc(720 / 1200);">
<source srcset="*" media="*">
<source srcset="*" media="*">
<source srcset="*" media="*">
<img src="*">
</picture>
// ASPECT RATIO
//
// This allows for background images
//
$aspect-ratio-bg-svg: null
$aspect-ratio-bg-color: $gray-200;
$aspect-ratio-bg-size: 20%;
// RATIO PRESETS
//
// This will generate class names
//
$aspect-ratios: (
"720x1200": calc(720 / 1200),
);
// MIXINS
//
// This is a mixin function you can call to generate ratio
//
aspect-ratio($height: 1000, $width: 500);
responsive
background-color
.bg-transparent
.bg-white
.bg-ivory
.bg-gray
.bg-black
<!-- Renders a transparent background -->
<div class="bg-transparent"></div>
<!-- Renders a black background -->
<div class="bg-black"></div>
/* -------------------------------------------- */
/* BACKGROUND COLORS */
/* -------------------------------------------- */
$background-colors: (
"transparent": transparent,
"white": $white,
"black": $black,
"ivory": $gray-100,
"gray": $gray-400
) !default;
responsive
box-shadow
-number
levels.
.bs-1
.bs-2
.bs-3
<!-- Small Box Shadow -->
<div class="bs-1"></div>
<!-- Medium (normal) Box Shadow -->
<div class="bs-2"></div>
<!-- Large Box Shadow -->
<div class="bs-3"></div>
/* -------------------------------------------- */
/* BORDER COLORS */
/* -------------------------------------------- */
$border-color: $gray-300;
$border-colors: (
black: $black,
white: $white,
red: $red,
gray: $gray-400,
green: $green
);
/* -------------------------------------------- */
/* BORDERS */
/* -------------------------------------------- */
$border-width: .07rem;
$border-style: solid;
$border-color-translucent: rgba($black, .175);
$border-widths: (
1: .1rem,
2: .2rem
);
responsive
border-* border
.b
is used to apply a full border whereas suffixed directions of t
(top), b
(bottom), l
(left) and r
(right) are used to apply borders according to angle.
.bd
.bl
.br
.bt
.bb
.bx
.by
.bd
.bc-white
.bc-black
.bc-red
.bc-green
.bd
.bw-1
.bw-2
<!-- Renders a border in gray -->
<div class="bd"></div>
<!-- Renders a border on the bottom in black -->
<div class="bb bc-black"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br bt"></div>
<!-- Renders a border on the right and border on the top -->
<div class="br br-md-0 br-lg"></div>
<!-- Renders a .2rem thick border on the top in green -->
<div class="bt bw-2 bc-green"></div>
<!-- Renders a border on the right and left top in green -->
<div class="bl br bc-green"></div>
<!-- Renders a border in gray in mobileand desktop but not tablet -->
<div class="b b-sm-0 b-lg"></div>
/* -------------------------------------------- */
/* BORDER COLORS */
/* -------------------------------------------- */
$border-color: $gray-300;
$border-colors: (
black: $black,
white: $white,
red: $red,
gray: $gray-400,
green: $green
);
/* -------------------------------------------- */
/* BORDERS */
/* -------------------------------------------- */
$border-width: .07rem;
$border-style: solid;
$border-color-translucent: rgba($black, .175);
$border-widths: (
1: .1rem,
2: .2rem
);
responsive
border-radius
.rd
.rd-1
.rd-2
.rd-3
.rd-t
.rd-r
.rd-b
.rd-l
.circle
<!-- Applied a default radius -->
<div class="bd rd"></div>
<!-- Applies a radius of 50% that is 3px thick -->
<div class="bd-3 circle"></div>
The variables will be transformed by utitlities.
/* -------------------------------------------- */
/* BORDERS RADIUS */
/* -------------------------------------------- */
$border-radius: .25rem !default;
$border-radius-sm: .2rem !default;
$border-radius-lg: .3rem !default;
$border-radius-pill: 50rem !default;
Buttons default to using the outlined style.
.btn-gray
.btn-black
.btn-red
.btn-green
The button states can infer something. Toggle
.is-loding
in js
.is-loading
.disabled
Unlike Bootstrap, in order to use solid colors we pass
bg-*
.bg-gray
.bg-black
.bg-red
.bg-green
The
.btn-close
uses a
input
button
bg-*
.btn-close
Buttons can be different sizes
.btn-sm
.btn-md
.btn-lg
href
elements.
<!-- Renders a button without style, ie: blank button -->
<button type="button" class="btn">Click</button>
<!-- Renders a black button -->
<button type="button" class="btn btn-black">Click</button>
<!-- Renders an outlined button -->
<button type="button" class="btn btn-outline-black">Click</button>
<!-- Renders an xl sized button with radius -->
<button type="button" class="btn btn-xl rd">Click</button>
<!-- Renders a button to a <a href="*"> element -->
<a class="btn btn-outline-black btn-sm">Click</a>
<!-- Render the close button - uses <input> instead of <button> -->
<input type="button" class="btn btn-close">
$btn-border-radius: none;
$btn-border-radius-sm: none;
$btn-border-radius-lg: none;
$btn-text-uppercase: true;
$btn-font-family: $font-family-heading;
$btn-font-size: $font-size-sm;
$btn-font-size-sm: $font-size-xs;
$btn-font-size-lg: $font-size-lg;
$btn-line-height: $line-height-base;
$btn-focus-color: $transparent;
$btn-focus-width: .25rem;
$btn-focus-opacity: .25;
$btn-disabled-opacity: .65;
$btn-padding-y-sm: .2rem;
$btn-padding-y: .375rem;
$btn-padding-y-lg: .5rem;
$btn-padding-x-sm: .45rem;
$btn-padding-x: .75rem;
$btn-padding-x-lg: 1rem;
$btn-white-space: nowrap; // Set to `nowrap` to prevent text wrapping
responsive
a
href
logics. Most the Bootstrap helpers and utilities are stripped out. We only want the bare minimum here. The list-list
is a re-write and only supports nested href
nodes.
<a href="*">
This is the
stretched
link
logic but uses a the
.link
class naming convention. Hover over the outer
div
with black border and the
Link
will be detected. It requires the parent element uses a postion
relative.
.link
.link-list
<!-- Default Link -->
<a href="#">Some Link</a>
<!-- Link cover requires parent element to be "relative" -->
<div class="rel">
<a href="#" class="link">Some Link</a>
</div>
<!-- Link List -->
<div class="link-list">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
responsive
al, ol, ul
ul > li
.list-dash
.list-lined
.list-inline
.list-pipe
Inline pipes are not responsive and when overflow occurs the scrollbar will be hidden.
<!-- Default List -->
<ul>
<li>Item</li>
<li>Item</li>
</ul>
<!-- Pipe List -->
<ul class="list-pipe">
<li>Item</li>
<li>Item</li>
</ul>
<!-- Dash List -->
<ul class="list-dash">
<li>Item</li>
<li>Item</li>
</ul>
<!-- List Inline -->
<ul class="list-inline">
<li>Item</li>
<li>Item</li>
</ul>
<!-- Lined List -->
<ul class="list-lined">
<li>Item</li>
<li>Item</li>
<!-- Annotate with aria-label for right badge -->
<li aria-label="badge">Item</li>
</ul>
responsive
responsive
.spinner
.spinner-sm
<!-- renders a small spinner animation -->
<span class="spinner-sm"></span>
<!-- renders a spinner animation -->
<span class="spinner"></span>
The size can be adjusted, like (for example) the spinner thickness.
/* -------------------------------------------- */
/* SPINNER */
/* -------------------------------------------- */
$spinner-width: 2rem !default;
$spinner-width-sm: 1rem !default;
$spinner-height: $spinner-width !default;
$spinner-height-sm: $spinner-width-sm !default;
$spinner-vertical-align: -.125em !default;
$spinner-border-width: .25em !default;
$spinner-border-width-sm: .2em !default;
$spinner-border-color: $gray-300;
$spinner-animation-speed: .75s !default;
responsive
data-tooltip
aria-label
and data-tooltip
attribute annotations. The logic is exteremly simply. The $tooltip-use-outline
will invert the styling.
data-tooltip="top"
data-tooltip="bottom"
data-tooltip="left"
data-tooltip="right"
data-tooltip="top-left"
data-tooltip="top-right"
data-tooltip="bottom-left"
data-tooltip="bottom-right"
<!-- Tooltip appears at the top of the element -->
<button aria-label="Tooltip Top" data-tooltip="top">
Hover Me
</button>
<!-- Tooltip appears at the bottom of the element -->
<button aria-label="Tooltip Bottom" data-tooltip="bottom">
Hover Me
</button>
<!-- Tooltip appears at the left of the element -->
<button aria-label="Tooltip left" data-tooltip="left">
Hover Me
</button>
<!-- Tooltip appears at the right of the element -->
<button aria-label="Tooltip right" data-tooltip="right">
Hover Me
</button>
// CONTROL TOOLTIP
//
// These variables control the tooltip styling applied
//
$tooltip-bg: $black;
$tooltip-font-family: $font-family-base;
$tooltip-font-style: normal;
$tooltip-font-size: $font-size-xs;
$tooltip-font-color: $white;
$tooltip-padding-y: .1rem;
$tooltip-padding-x: .5rem;
$tooltip-arrow-size: 5px;
$tooltip-radius: 0;
// CONTROL ANIMATION
//
// Use this to disable the fade animation
//
$tooltip-animation: true;
// CONTROL OUTLINE
//
// Use this to enable outline styling
//
$tooltip-border-width: .01rem;
$tooltip-use-outline: true;
responsive
Demonstrates input type form fields. The examples are used to showcase precision height, width and pseudo overwrites.
Basic text input field
Search input field with customisations
Basic text input field using float placeholder
Basic text input field using float placeholder
The native select form element
Dynamic dropdown select component which replicates a select
Switch checkbox form component
Incremental form component which applied type number
Native default checkbox using custom SVG icons
Native default radio using custom SVG icons
responsive
.fm-dropdown
class is for usage within forms designed to work together with the Stimulus Dropdown
controller. The structure leverages type="radio"
and label
inputs to infer a selection. In addition, you can annotate the label
with a aria-label
which will render a badge to the right side.
.fm-dropdown
.fm-dropdown .disabled
.fm-dropdown .selected
.fm-dropdown .is-valid
.fm-dropdown .is-invalid
.fm-dropdown .is-open
<!-- Form Dropdown List -->
<div class="fm-dropdown">
<!-- Button is always first and required (no class is needed) -->
<button type="button">Dropdown Select</button>
<!-- Wrap the dropdown in a form fieldset -->
<fieldset>
<!-- Each item must use a "label" element, the "for" attribute must point to the "input" id -->
<label for="1">Option 1</label>
<input id="1" type="radio">
<!-- When a value is selected, include a "selected" class -->
<label class="selected" for="2">Option 2</label>
<input id="2" type="radio">
<!-- Optionally disable a list item using a "disabled" class -->
<label class="disabled" for="3">Option 3</label>
<input id="3" type="radio">
<!-- Use the "aria-label" attribute to insert a bade on right side -->
<label aria-label="Some Label" for="4">Option 4</label>
<input id="4" type="radio">
<label for="5">Option 5</label>
<input id="5" type="radio">
<label for="6">Option 6</label>
<input id="6" type="radio">
</fieldset>
</div>
responsive
input
tag. The classes are mostly inherited from Bootstrap with refined naming conventions and SVG validation icon changes. There are only 2 sizes available in form inputs, small (fm-sm
) and the normal default (base) sizing.
.fm-input
.fm-input .is-valid
.fm-input .is-invalid
.fm-input .fm-sm
.fm-input .fm-sm .is-valid
.fm-input .fm-sm .is-invalid
readonly
disabled
disabled readonly
<!-- Default Input -->
<input class="fm-input" placeholder="Default Input" type="text">
<!-- Small Input -->
<input class="fm-input fm-sm" placeholder="Small Input" type="text">
<!-- Large Input -->
<input class="fm-input fm-lg" placeholder="Large Input" type="text">
<!-- Default Input Valid -->
<input class="fm-input is-valid" placeholder="Valid Input" type="text">
<!-- Default Input Invalid -->
<input class="fm-input is-invalid" placeholder="Invalid Input" type="text">
<!-- Small Input Valid -->
<input class="fm-input fm-sm is-valid" placeholder="Valid Input Small" type="text">
form-input
// SPACING CONTROL
//
// This can typically be ignored and not adjusted.
//
$input-padding-y: .375rem;
$input-padding-y-sm: .25rem;
$input-padding-y-lg: .5rem;
$input-padding-x: .75rem;
$input-padding-x-sm: .5rem;
$input-padding-x-lg: 1rem;
// FONT CONTROL
//
// Adjust the input fonts here. Probably best to skip adjusting font-sizes.
//
$input-text-uppercase: false;
$input-font-family: $headings-font-family;
$input-font-weight: $font-weight-base;
$input-font-size: $font-size-base;
$input-font-size-sm: $font-size-sm;
$input-font-size-lg: $font-size-lg;
$input-line-height: $line-height-base;
// COLOR CONTROL
//
// Adjust the input background, borders and font colors
//
$input-bg: $body-bg;
$input-color: $body-color;
$input-disabled-bg: $gray-100;
$input-disabled-border-color: $gray-200;
// BORDER CONTROL
//
// Adjust the input borders. Probably best to skip adjusting.
//
$input-border-color: $gray-400;
$input-border-width: $border-width;
$input-box-shadow: $box-shadow-inset;
// BORDER RADIUS
//
// Input borders do not use radius by default in the strap.
//
$input-border-radius: 0;
$input-border-radius-sm: 0;
$input-border-radius-lg: 0;
// FOCUS CONTROL
//
// These variables control the outline and focused state on the inputs.
//
$input-focus-bg: $input-bg;
$input-focus-border-color: $black;
$input-focus-color: $input-color;
$input-focus-width: $border-width;
$input-focus-box-shadow: none;
// MISC CONTROL
//
// Other noteable variables for controlling input.
//
$input-btn-focus-box-shadow-lined: 0 0 0 0;
$input-placeholder-color: $gray-500;
$input-plaintext-color: $body-color;
responsive
fm-lined
will result in a bottom line based style to form inputs, selects and dropdowns. This lined style is used as an UI aesthetic in the Brixtol Textiles webshop.
.fm-input .fm-lined
.fm-input .fm-lined .is-valid
.fm-input .fm-lined .is-invalid
.fm-select .fm-lined
.fm-select .fm-lined .is-valid
.fm-select .fm-lined .is-invalid
.fm-dropdown .fm-lined
.fm-dropdown .fm-lined .is-valid
.fm-dropdown .fm-lined .is-invalid
.fm-group .fm-lined > .fm-input
.fm-group .fm-lined > .fm-input
.fm-group .fm-lined > .fm-input .is-valid
.fm-group .fm-lined > .fm-input .is-invalid
.fm-input
.fm-input
.fm-input .is-valid
.fm-input .is-invalid
responsive
.fm-group
.fm-float .fm-lg
.fm-group
.fm-float .fm-lg
<!-- Default Input -->
<input class="fm-input" placeholder="Default Input" type="text">
<!-- Small Input -->
<input class="fm-input fm-sm" placeholder="Small Input" type="text">
<!-- Large Input -->
<input class="fm-input fm-lg" placeholder="Large Input" type="text">
<!-- Default Input Valid -->
<input class="fm-input is-valid" placeholder="Valid Input" type="text">
<!-- Default Input Invalid -->
<input class="fm-input is-invalid" placeholder="Invalid Input" type="text">
<!-- Small Input Valid -->
<input class="fm-input fm-sm is-valid" placeholder="Valid Input Small" type="text">
form-group
// SPACING CONTROL
//
// This can typically be ignored and not adjusted.
//
$input-padding-y: .375rem;
$input-padding-y-sm: .25rem;
$input-padding-y-lg: .5rem;
$input-padding-x: .75rem;
$input-padding-x-sm: .5rem;
$input-padding-x-lg: 1rem;
// FONT CONTROL
//
// Adjust the input fonts here. Probably best to skip adjusting font-sizes.
//
$input-text-uppercase: false;
$input-font-family: $headings-font-family;
$input-font-weight: $font-weight-base;
$input-font-size: $font-size-base;
$input-font-size-sm: $font-size-sm;
$input-font-size-lg: $font-size-lg;
$input-line-height: $line-height-base;
// COLOR CONTROL
//
// Adjust the input background, borders and font colors
//
$input-bg: $body-bg;
$input-color: $body-color;
$input-disabled-bg: $gray-100;
$input-disabled-border-color: $gray-200;
// BORDER CONTROL
//
// Adjust the input borders. Probably best to skip adjusting.
//
$input-border-color: $gray-400;
$input-border-width: $border-width;
$input-box-shadow: $box-shadow-inset;
// BORDER RADIUS
//
// Input borders do not use radius by default in the strap.
//
$input-border-radius: 0;
$input-border-radius-sm: 0;
$input-border-radius-lg: 0;
// FOCUS CONTROL
//
// These variables control the outline and focused state on the inputs.
//
$input-focus-bg: $input-bg;
$input-focus-border-color: $black;
$input-focus-color: $input-color;
$input-focus-width: $border-width;
$input-focus-box-shadow: none;
// MISC CONTROL
//
// Other noteable variables for controlling input.
//
$input-btn-focus-box-shadow-lined: 0 0 0 0;
$input-placeholder-color: $gray-500;
$input-plaintext-color: $body-color;
responsive
fm-toggle
class wrapper. The fields require a id
be applied to the inputs and for
attribute to label as they are identified as siblings. The items use the short-name fm-
and need to be nested in a .fm-toggle
node.
.fm-checkbox
.fm-checkbox .is-valid
.fm-checkbox .is-invalid
.fm-check .fm-lg
.fm-check .fm-lg
checked
checked disabled
disabled
.fm-check reverse
<!-- Default Checkmark -->
<div class="fm-toggle">
<input class="fm-checkbox" type="checkmark" id="xx" name="xx">
<label class="fm-label" for="xx">Label</label>
</div>
<!-- Default checkmark with label at front -->
<div class="fm-toggle reverse">
<input class="fm-checkbox" type="checkmark" id="xx" name="xx">
<label class="fm-label" for="xx">Label</label>
</div>
// SPACING CONTROL
//
// This can typically be ignored and not adjusted.
//
$form-check-input-width: 1rem;
$form-check-min-height: $font-size-base * $line-height-base;
$form-check-padding-start: $form-check-input-width + .5rem;
$form-check-margin-bottom: .125rem;
$form-check-label-color: null;
$form-check-label-cursor: pointer;
$form-check-label-spacing: .75rem;
$form-check-transition: null;
$form-check-input-active-filter: $body-bg;
$form-check-input-bg: $input-bg;
$form-check-input-border: $border-width $border-style $input-border-color;
$form-check-input-border-radius: 0;
$form-check-radio-border-radius: 0;
// FOCUS CONTROL
//
// This will control the focus state of a checkmark
//
$form-check-input-focus-border: $black;
$form-check-input-focus-box-shadow: none;
// SVG ICON CONTROL
//
// This is used for the styling of the cross icon
//
$form-check-input-checked-color: $black;
$form-check-input-checked-bg-color: $transparent;
$form-check-input-checked-border-color: $black;
$form-check-input-checked-bg-image: icon-check($form-check-input-checked-color);
$form-check-input-disabled-opacity: .5;
$form-check-label-disabled-opacity: $form-check-input-disabled-opacity;
$form-check-btn-check-disabled-opacity: $btn-disabled-opacity;
$form-check-inline-margin-end: 1rem;
responsive
.fm-range
.fm-range .is-valid
.fm-range .is-invalid
disabled
form-range
<!-- Default Input -->
<input class="fm-input" placeholder="Default Input" type="text">
<!-- Small Input -->
<input class="fm-input fm-sm" placeholder="Small Input" type="text">
<!-- Large Input -->
<input class="fm-input fm-lg" placeholder="Large Input" type="text">
<!-- Default Input Valid -->
<input class="fm-input is-valid" placeholder="Valid Input" type="text">
<!-- Default Input Invalid -->
<input class="fm-input is-invalid" placeholder="Invalid Input" type="text">
<!-- Small Input Valid -->
<input class="fm-input fm-sm is-valid" placeholder="Valid Input Small" type="text">
responsive
.fm-switch
.fm-switch .fm-sm
.fm-switch .fm-lg
.fm-checkbox .is-valid
.fm-checkbox .is-invalid
<!-- Renders a floating label -->
<div class="fm-switch">
<input class="fm-check-input" id="xx" name="{{ name }}" type="checkbox">
<label class="fm-check-label" for="xx">Label</label>
</div>
form-switch
/* -------------------------------------------- */
/* FORM FLOATING */
/* -------------------------------------------- */
$form-floating-height: add(3rem, $input-height-border);
$form-floating-line-height: 1.25 !default;
$form-floating-padding-x: .75rem;
$form-floating-padding-y: .85rem;
$form-floating-input-padding-t: 1.325rem !default;
$form-floating-input-padding-b: .625rem !default;
$form-floating-label-opacity: .65 !default;
$form-floating-label-transform: scale(0.75) translateY(-.5rem) translateX(.35rem);
$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;
responsive
.fm-float
.fm-float .fm-lg
.fm-float
.fm-float .fm-lg
.fm-float .fm-lg
.fm-float .fm-lg
<!-- Renders a floating label -->
<div class="fm-float mb-3">
<input class="fm-input" id="xx" placeholder="name@example.com" type="email">
<label for="xx">Text</label>
</div>
<!-- Renders a float label in textarea -->
<div class="fm-float mb-3">
<textarea class="fm-input" id="xx" placeholder="Message" style="height: 100px"></textarea>
<label for="xx">Textarea</label>
</div>
<!-- Renders a large float label that is invalid -->
<div class="fm-float fm-lg mb-3">
<input class="fm-input is-invalid" id="xx" placeholder="name@example.com" type="email">
<label for="xx">Text</label>
</div>
<!-- Renders a float label that is valid -->
<div class="fm-float mb-3">
<input class="fm-input is-valid" id="xx" placeholder="name@example.com" type="email">
<label for="xx">Text</label>
</div>
<!-- Renders a float Select label -->
<select class="fm-select" id="select">
<option value="1">One</option>
<option value="2">Two</option>
</select>
/* -------------------------------------------- */
/* FORM FLOATING */
/* -------------------------------------------- */
$form-floating-height: add(3rem, $input-height-border);
$form-floating-line-height: 1.25 !default;
$form-floating-padding-x: .75rem;
$form-floating-padding-y: .85rem;
$form-floating-input-padding-t: 1.325rem !default;
$form-floating-input-padding-b: .625rem !default;
$form-floating-label-opacity: .65 !default;
$form-floating-label-transform: scale(0.75) translateY(-.5rem) translateX(.35rem);
$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;
responsive
.fm-number .fm-sm
.fm-number
.fm-number .is-valid
.fm-number .is-invalid
<!-- Form Number is wrapped within a fieldset -->
<fieldset class="fm-number">
<!-- Decrement Button is expressed as an input -->
<input class="decrement" type="button" onclick="this.parentNode.children[1].stepDown()">
<!-- Form Number input -->
<input class="fm-input" type="number" placeholder="0" min="0" name="quantity">
<!-- Increment Button is expressed as an input -->
<input class="increment" type="button" onclick="this.parentNode.children[1].stepUp()">
</fieldset>
responsive
.modal
responsive
.relapse
class name, but instead use .accordion
. The styles are inherited from vairous utilities and can be customized.
<!-- Simple Accordion -->
<div
class="accordion"
data-controller="accordion"
data-accordion-multiple-value="false"
data-accordion-persist-value="true">
<!-- PANEL 1 -->
<details>
<summary class="accordion-btn">
Opens Fold # 1
</summary>
<div>
<div class="p-4">
This is Fold #1
</div>
</div>
</details>
<!-- PANEL 2 -->
<details>
<summary class="accordion-btn">
Opens Fold # 1
</summary>
<div>
<div class="p-4">
This is Fold #1
</div>
</div>
</details>
</div>
accordion
// SPACING CONTROL
//
// This can typically be ignored and not adjusted.
//
$form-check-input-width: 1rem;
$form-check-min-height: $font-size-base * $line-height-base;
$form-check-padding-start: $form-check-input-width + .5rem;
$form-check-margin-bottom: .125rem;
$form-check-label-color: null;
$form-check-label-cursor: pointer;
$form-check-label-spacing: .75rem;
$form-check-transition: null;
$form-check-input-active-filter: $body-bg;
$form-check-input-bg: $input-bg;
$form-check-input-border: $border-width $border-style $input-border-color;
$form-check-input-border-radius: 0;
$form-check-radio-border-radius: 0;
// FOCUS CONTROL
//
// This will control the focus state of a checkmark
//
$form-check-input-focus-border: $black;
$form-check-input-focus-box-shadow: none;
// SVG ICON CONTROL
//
// This is used for the styling of the cross icon
//
$form-check-input-checked-color: $black;
$form-check-input-checked-bg-color: $transparent;
$form-check-input-checked-border-color: $black;
$form-check-input-checked-bg-image: icon-check($form-check-input-checked-color);
$form-check-input-disabled-opacity: .5;
$form-check-label-disabled-opacity: $form-check-input-disabled-opacity;
$form-check-btn-check-disabled-opacity: $btn-disabled-opacity;
$form-check-inline-margin-end: 1rem;
responsive
@include carousel(( slides: 2, margin: 10px, cursor: move ));
// xxs, xs, sm, md, lg, xl, xxl
@include carousel((
xs: (
slides: 2,
margin: 10px,
cursor: pointer
),
md: (
slides: 2,
margin: 0,
cursor: move
),
lg: (
slides: 2,
margin: 10px,
cursor: pointer
),
xl: (
slides: 1,
margin: 0,
cursor: move
)
))
<!-- Basic carousel with required markup -->
<div class="carousel" data-controller="carousel">
<div>
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
</div>
</div>
<!-- Basic carousel with images -->
<div class="carousel" data-controller="carousel">
<div>
<div class="slide">
<!-- Response Images with Ratio -->
<div class="ratio ratio-*">
<picture>
<source srcset="*" media="*">
<source srcset="*" media="*">
<img src="*">
</picture>
</div>
</div>
<div class="slide">
<!-- Response Images with Ratio -->
<div class="ratio ratio-*">
<picture>
<source srcset="*" media="*">
<source srcset="*" media="*">
<img src="*">
</picture>
</div>
</div>
</div>
</div>
// Accepts a number
//
@include carousel(1)
// 2 slides with 20px margin
//
@include carousel((
slides: 2,
margin: 10px,
))
// 3 slides with 10px margin and cursor
//
@include carousel((
slides: 2,
margin: 10px,
cursor: move
))
// Responsive slides to generate
//
@include carousel((
xs: (
slides: 2,
margin: 10px,
cursor: pointer
),
md: (
slides: 1,
margin: 0,
cursor: move
)
))