Low-level CSS Toolkit – the original Functional/Utility/Atomic CSS library
Inspired by discussions with the community, Basscss v8 is a simplification of styles and a narrowing of scope based on recent trends in front-end web development – particularly component-based UI approaches – and the unique features that Basscss provides. The core module is now just 2.2 KB minified and gzipped with a focus on widely applicable typography and layout utilities that can be added to virtually any existing style guide or framework.
Basscss v8 should be considered feature complete – that is all essential layout and typography utilities are, for the most part, covered. There may be additional minor features and optional modules added in the future, but this release is meant to be more stable in regards to features and naming conventions than previous releases.
.container
style has been removed from basscss-grid and is replaced with max-width utilities in basscss-layout.x
and y
shorthand styles for the x- and y-axes..ml-auto
and .mr-auto
for added possibilities with flexbox layouts.t
, r
, b
, and l
shorthand styles for top, right, bottom, and left directions.npm test
to see it in action.css
folder.For any module that has been removed from the core, they are still available from basscss/addons. To continue using these modules, import them in addition to the core module.
body
, img
, svg
, input
, select
, textarea
, fieldset
, label
, table
, th
, td
, h1
, h2
, h3
, h4
, h5
, h6
, p
, dl
, ol
, ul
, pre
, samp
, code
, a
, and hr
btn
, btn-primary
, and btn-outline
styles should either be imported separately or replaced with custom styles.field
class with input
, select
, and textarea
respectively. Optionally use the label
style for labels. Custom colors styles should be added to replace the older basscss-color-forms module.table-light
style has been removed. Replace it with custom styles.flex-center
with items-center
.flex-baseline
with items-baseline
.flex-stretch
with items-stretch
.flex-start
with items-start
.flex-end
with items-end
.flex-justify
with justify-between
flex-grow
has been removed. In many cases flex-auto
can replace the old flex-grow
style.flex-first
with order-0
.flex-last
with order-last
.container
with max-width-4 mx-auto
..border
, .border-top
, .border-right
, .border-bottom
, or .border-left
, add an additional border-color class and custom style where the border color differs from foreground color.display: none
at just one breakpoint. Adjust classes on elements using .sm-show
, .md-show
, .lg-show
, .sm-hide
, and .md-hide
.
sm-show
with xs-hide
.md-show
with xs-hide sm-hide
.lg-show
with xs-hide sm-hide md-hide
.sm-hide
with sm-hide md-hide lg-hide
.md-hide
with md-hide lg-hide
.lg-hide
works the same as in the previous module.Basscss 7 is a simplification and realignment of design principles intended to better fit in with component-base architectures. Version 7 is less opinionated and more flexible than ever. With 19% fewer rules and 27% fewer declarations, version 7 is just 3.32KB gzipped – 13% smaller than before.
<p>
, <dl>
, <ol>
, and <ul>
<hr>
margin styles.fieldset-reset
– use .p0
, .m0
, and .border-none
instead.full-width
– use .col-12
instead.half-width
– use .col-6
insteadNote: modules are still optionally available through npm
.progress
.range-light
.button
.button-big
, .button-small
, and .button-narrow
.button-outline
.button-transparent
.bg-cover
, .bg-contain
, .bg-center
, .bg-top
, .bg-right
, .bg-bottom
, .bg-left
.field-dark
.border-black
, .border-gray
, etc.Basscss now has it's own GitHub organization, and this repo has been reorganized and cleaned up.
Basscss now is more colorful and more flexible with the flex-object flexbox layout module and new extensible button styles.
flex-object
flexbox layout module included by default.button
color styles in basscss-color-base
, extensible with color utilitiesbutton-outline
module, extensible with color utilitiesbutton-transparent
module, extensible with color utilitiesui-utility-button-sizes
included by defaultbackground-images
module included by default.muted
utility to set opacity to .5basscss-colors
module (e.g. dark-gray
, mid-gray
, light-gray
)Deprecated modules are still available through npm for custom builds. To use the default styles new in v5, do the following:
Replace instances of the table object with flex-object utilities or clearfix/float solutions.
.button-blue
with .button
..button-blue-outline
with .button-outline.blue
..button-red
with .button.bg-red
..button-gray
with .button.bg-gray
..button-light-gray
with .button.bg-silver
.The entire color palette has been replaced with mrmrs/colors. For backwards compatibility, .dark-gray
, .mid-gray
, and .light-gray
are mapped to .black
, gray
, and .silver
, respectively, but will be deprecated in a future version. .lighter-gray
has been removed. .white
has not changed.
The default values for .blue
, .green
, .yellow
, and .red
have changed.
The following colors have also been added:
.aqua
.navy
.teal
.olive
.lime
.orange
.fuchsia
.purple
.maroon
button-light-gray
style/docs/modules
Utilities for UI elements