4.1.2 • Published 2 months ago

bullframe.css v4.1.2

Weekly downloads
11
License
MIT
Repository
github
Last release
2 months ago

bullframe.css

bullframe.css logo

https://github.com/marcop135/bullframe.css

bullframe.css is a Sass (SCSS) framework that works in a wide range of desktop and mobile browsers. It's a cross-browser and responsive collection of default HTML UI elements (atoms) for your Sass project.

You could be easily use it for marketing sites, landing pages, mini sites, micro sites, blog posts, e-commerce product listings, help and documentation, and more.

Just add bullframe.css in your webpage, write semantic HTML, and you are ready to go!

Best features

  • Wide range of desktop and mobile browsers support
  • Responsive-ness and style normalization out-of-the-box
  • Cross-browser form elements by default
  • Sass architecture
  • CSS BEM
  • Responsive typography
  • Dark mode and theming support
  • RTL support
  • Gulp-friendly
  • Classless-friendly

What's included

You'll see something like this:

bullframe.css/
└── dist/
    ├── css/
    │   ├── bullframe-classless.css
    │   ├── bullframe-classless.min.css
    │   ├── ...
    │   ├── bullframe-dark.css
    │   ├── bullframe-dark.min.css
    │   ├── ...
    │   ├── bullframe-utilities.css
    │   ├── bullframe-utilities.min.css
    │   ├── ...
    │   ├── bullframe.css
    │   ├── bullframe.min.css
    │   ├── ...
    │   ├── bullframe-classless.css.map
    │   ├── bullframe.min.css.map
    │   ├── ...
└── src/scss/
    └── forms/
    └── miscellaneous/
    └── mixins/
    └── typography/
    └── utilities/
    └── variables/
    ...
    ├── bullframe-classless.scss
    ├── bullframe-system-default.scss
    ├── bullframe-dark.scss
    ├── bullframe-utilities.scss
    ├── bullframe.scss
    ...
└── gulpfile.js
└── index.html
...

Getting started

Download

Download the latest release

CDN

JSDelivr

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css">

npm

Once you have installed Node.js, you can run this command to install bullframe.css into your project:

# create a package.json file
# $ npm init

npm install bullframe.css

What is Node?

What is npm?

Gulp.js

After installing bullframe.css from npm, you may use gulp.js to re-compile all files, and customize your Sass project as needed.

# navigate to /node_modules/bullframe.css

# install all dependencies
npm install

# run gulp and have fun!
gulp

What is gulp.js?

HTML

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>bullframe.css starter template</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css@4/dist/css/bullframe.min.css">
</head>
<body>
  <div class="bf-container">
    <!-- Add your site or application content here -->
    <p>Hello world! This is a bullframe.css starter template</p>
  </div>
</body>
</html>

Codepen

Take a look at this CodePen collection and fork a ready-made templates of your choice.

Use bullframe.css as a CodePen template

Click on the links below, and start a new pen in CodePen using bullframe.css.

Customization

No classes (class-less)

What means "classless"? No classes, no utilities. Feel free to add yours and create your custom components. Read more on css-tricks.com.

Just drop the snippet below in the <head> of your webpage, and the job is done! Write semantic HTML and get nice styles and cross-browser normalization.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css@4/dist/css/bullframe-classless.min.css">

<!-- Center the page (optional)  -->
<style>
  body {
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
    max-width: 80rem;
  }
</style>

Theming

There are three builds available:

  1. bullframe.css: the light theme
  2. bullframe-dark.css: the dark theme
  3. bullframe-system-default.css: the theme set by the user as default (which can be light or dark). Read more on MDN.

bullframe.css

CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css/dist/css/bullframe.min.css">

bullframe-dark.css

CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css/dist/css/bullframe-dark.min.css">

bullframe-system-default.css

CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css/dist/css/bullframe-system-default.min.css">

Utilities - Reference

A set of utilities for bullframe.css customisation:

Grid system

Breakpoints: 576, 768, 992 and 1200 pixels

Utility classDescription
.bf-containerSets a centered block container with a max-width of 1140px, and a custom padding
.bf-container--fluidSets a fluid centered block container with a custom padding
.bf-container--break-xsCollapses all the columns when the viewport is 575px and below
.bf-container--break-mdCollapses all the columns when the viewport is 767px and below
.bf-container--break-lgCollapses all the columns when the viewport is 991px and below
.bf-rowSets a block container with a custom negative margin
.bf-col-1Sets a floated container with a custom padding and a width of 8.3333%
.bf-col-2Sets a floated container with a custom padding and a width of 16.666666666666664%
.bf-col-3Sets a floated container with a custom padding and a width of 25%
.bf-col-4Sets a floated container with a custom padding and a width of 33.33333333333333%
.bf-col-5Sets a floated container with a custom padding and a width of 41.66666666666667%
.bf-col-6Sets a floated container with a custom padding and a width of 50%
.bf-col-7Sets a floated container with a custom padding and a width of 58.333333333333336%
.bf-col-8Sets a floated container with a custom padding and a width of 66.66666666666666%
.bf-col-9Sets a floated container with a custom padding and a width of 75%
.bf-col-10Sets a floated container with a custom padding and a width of 83.33333333333334%
.bf-col-11Sets a floated container with a custom padding and a width of 91.66666666666666%
.bf-col-12Sets a floated container with a custom padding and a width of 100%
.no-guttersSet margin-left, margin-right, padding-left and padding-right to 0 — to be applied to row and column containers

Layout

Utility classDescription
.bf-clearfixClears the float, read more
.bf-hideSets the display to none
.bf-hiddenSets the display to none and the visibility to hidden
.bf-text-hideHides a text (AKA CSS image replacement) using a font hack and a combination o properties
.bf-sr-onlyShows a text only if screen reader
.bf-sr-only.focusableShows a text only if screen reader and focused
.bf-invisibleSets the visibility to hidden
.bf-visibleSets the visibility to visible
.bf-display-blockSets the display to block
.bf-display-block-centerSets the display to block, the left/right margins to auto and text-align to center
.bf-display-inlineSets the display to inline
.bf-display-inline-blockSets the display to inline-block
.bf-display-flexSets the display to flex
.bf-display-inline-flexSets the display to inline-flex
.bf-display-flex--justify-startSets justify-content to flex-start
.bf-display-flex--justify-endSets justify-content to flex-end
.bf-display-flex--justify-centerSets justify-content to center
.bf-display-flex--wrapSets flex-wrap to wrap
.bf-display-flex--nowrapSets flex-wrap to nowrap
.bf-float-leftSets the float to left
.bf-float-rightSets the float to right
.bf-position-fixedSets the position to fixed
.bf-align-center-unknownSets the position to relative
.bf-align-center-unknown--itemCenters an element with unknown height and width to a relative positioned parent, IE10+, read more
.bf-align-center-flexCenters all elements with known height and width to a flexbox container, IE10+, read more
.bf-width-25Sets the width to 25%
.bf-width-33Sets the width to 33.33333333333333%
.bf-width-50Sets the width to 50%
.bf-width-75Sets the width to 75%
.bf-width-100Sets the width to 100%
.bf-width-autoSets the width to auto
.bf-z-index-1Set z-index to 1
.bf-z-index-2Set z-index to 2
.bf-z-index-3Set z-index to 3
.bf-z-index-4Set z-index to 4
.bf-z-index-5Set z-index to 5
.bf-z-index-6Set z-index to 6
.bf-z-index-7Set z-index to 7
.bf-z-index-8Set z-index to 8
.bf-z-index-9Set z-index to 9
.bf-z-index-10Set z-index to 10
.bf-z-index-20Set z-index to 20
.bf-z-index-30Set z-index to 30
.bf-z-index-40Set z-index to 40
.bf-z-index-50Set z-index to 50
.bf-z-index-60Set z-index to 60
.bf-z-index-70Set z-index to 70
.bf-z-index-80Set z-index to 80
.bf-z-index-90Set z-index to 90
.bf-z-index-100Set z-index to 100
.bf-z-index-200Set z-index to 200
.bf-z-index-300Set z-index to 300

Spacing

Utility classDescription
.bf-m-0Sets the margin to 0
.bf-m-t-0Sets the margin-top to 0
.bf-m-b-0Sets the margin-bottom to 0
.bf-m-l-0Sets the margin-left to 0
.bf-m-r-0Sets the margin-right to 0
.bf-m-b-1Sets the margin-bottom to a custom value that matches the grid system gutter
.bf-m-b-2Sets the margin-bottom to a custom value
.bf-m-b-3Sets the margin-bottom to a custom value
.bf-m-b-4Sets the margin-bottom to a custom value
.bf-p-0Sets the padding to 0
.bf-p-t-0Sets the padding-top to 0
.bf-p-b-0Sets the padding-bottom to 0
.bf-p-l-0Sets the padding-left to 0
.bf-p-r-0Sets the padding-right to 0
.bf-p-t-1Sets the padding-top to a custom value that matches the grid system gutter
.bf-p-t-2Sets the padding-top to a custom value
.bf-p-t-3Sets the padding-top to a custom value
.bf-p-t-4Sets the padding-top to a custom value
.bf-p-t-1Sets the padding-bottom to a custom value that matches the grid system gutter
.bf-p-b-2Sets the padding-bottom to a custom value
.bf-p-b-3Sets the padding-bottom to a custom value
.bf-p-b-4Sets the padding-bottom to a custom value

Texts

Utility classDescription
.bf-t-transform-uppercaseSets transform to a uppercase (AKA capitalizes a text)
.bf-t-transform-noneSets transform to a none
.bf-t-leftSets text-align to a left
.bf-t-centerSets text-align to a center
.bf-t-rightSets text-align to a right
.bf-t-shadowSets a basic text shadow
.bf-t-italicSets font-style to a italic
.bf-t-style-normalSets font-style to a normal
.bf-t-weight-300Sets font-weight to 300 (AKA light)
.bf-t-weight-400Sets font-weight to 400 (AKA normal)
.bf-t-weight-500Sets font-weight to 500 (AKA medium)
.bf-t-weight-600Sets font-weight to 600 (AKA semi-bold)
.bf-t-weight-700Sets font-weight to 700 (AKA bold)
.bf-t-weight-800Sets font-weight to 800 (AKA black)
.bf-text-breakSets word-wrap to a break-word, applied by default to the body
.bf-t-truncateTruncates a very long text and replaces the missing text with an ellipsis
.bf-t-truncate--multiline-2Truncates a long doubled line text and replaces the missing text with an ellipsis (no IE)
.bf-t-truncate--multiline-3Truncates a long tripled line text and replaces the missing text with an ellipsis (no IE)
.bf-no-selectBlocks user text selection
.bf-font-sans-serifSets font-family to a sans-serif, and a combination of cross-browser system UI sans-serif font families
.bf-font-serifSets font-family to a serif, and a combination of cross-browser system UI serif font families
.bf-font-monospaceSets font-family to a monospace, a combination of widely supported monospaced font families
.bf-h1Matches the font styling of a h1
.bf-h2Matches the font styling of a h2
.bf-h3Matches the font styling of a h3
.bf-h4Matches the font styling of a h4
.bf-h5Matches the font styling of a h5
.bf-h6Matches the font styling of a h6
.bf-leadSets font-size to 125%
.bf-responsive-typographyScales font-size from a minimum of 1.6rem (AKA 16px) to a maximum of 1.9rem using calc and some CSS custom properties

Lists

Utility classDescription
.bf-list-unstyledRemoves margins, paddings and li list styles from ul, ol and dd elements

Tables

Utility classDescription
.bf-tableSets a border and custom paddings and margins to a table
.bf-table-responsiveAdds responsiveness to a table container
.bf-table--zebraIncreases a table readability adding horizontal zebra stripes
.bf-table-responsive--zebraIncreases a responsive table readability adding horizontal zebra stripes

Embeds

Utility classDescription
.bf-embed-responsiveAdds responsiveness to an iframe, embed, object, video or general purpouse element (e.g. youtube embed)
.bf-embed-responsive--4-3Sets a 4:3 ratio responsiveness to an iframe, embed, object, video or general purpouse element container (e.g. youtube embed)
.bf-embed-responsive--itemA general purpouse element element that behaves like a video

Buttons

Utility classDescription
.bf-btnCreates a standard gray-looking button (e.g. <a class="bf-btn" href="...">...</a>)
.bf-btn--primaryCreates a primary blue-looking button

Form states

Utility classDescription
.bf-focusedSets a blue-looking focused ring and shadow around an input, textarea or select
.bf-disabledSets opacity to 0.5, and resets a combinations of properties to the default value if is disabled
.bf-invalidSets a red-looking focused ring and shadow around an invalid input, textarea or select

Reduced motion

Utility classDescription
.bf-reduced-motionAdds a combinations of properties and values to an element (e.g. the body) removing all motion-based animations if preferred by the user, read more

Browser compatibility

Desktop browsers

  • Latest stable two: Firefox, Chrome, Edge, Safari, Opera
  • IE 11+

Mobile browsers

  • Latest stable: Firefox, Chrome, Edge, Opera, Mobile Safari

You might take a look at the .browserslistrc file for Autoprefixer

Screenshots

How can I quickly determine if every HTML element works well on all browsers?

Take a look at some screenshots and screencasts, organized by rendering engines (blink, gecko, trident, webkit).

Contributors

@englishextra the project is still live thanks to you!

Contributing

Please read the contribution guidelines.

Changelog

Changelog

Acknowledgements

bullframe.css incorporates some of the styles found on some amazing CSS boilerplates and frameworks across the web. Thank you!

  • @necolas /normalize.css for the extensive old browsers bug fixing documentation
  • @h5bp /main.css for the excellent print styles base and the keyboard utilities
  • @twbs /bootstrap for some neat typography tricks, responsive embeds, reboot styles, base24 SVG icons, button styles, grid system breakpoints and spacing utilities (a lot!)
  • @kognise /water.css for the "classless" concept inspiration and some form tricks
  • @csswizardry @inuitcss /inuit.css for some advanced Sass tips and tricks
  • @jensimmons /cssremedy for the prefers-reduced-motion snippet

License

The MIT License (MIT) - http://opensource.org/licenses/MIT "The MIT License"

4.1.2

2 months ago

4.1.0

8 months ago

4.1.1

8 months ago

4.0.1

2 years ago

4.0.0

2 years ago

3.8.2

3 years ago

3.8.1

3 years ago

3.8.0

3 years ago

3.7.0

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.4.5

3 years ago

3.4.4

3 years ago

3.4.3

3 years ago

3.4.2

3 years ago

3.4.1

3 years ago

3.4.0

3 years ago

3.3.9

3 years ago

3.3.8

3 years ago

3.3.7

3 years ago

3.3.6

3 years ago

3.3.5

4 years ago

3.3.4

4 years ago

3.3.3

4 years ago

3.3.2

4 years ago

3.3.0

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.9.0

4 years ago