bulma-helpers

Library with Functional / Atomic CSS classes for Bulma framework

https://github.com/jmaczan/bulma-helpers

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.5%) to scientific vocabulary

Keywords

atomic-css bulma bulma-framework bulma-helpers css css-framework flexbox functional-css sass scss

Keywords from Contributors

mesh sequences interactive hacking
Last synced: 4 months ago · JSON representation ·

Repository

Library with Functional / Atomic CSS classes for Bulma framework

Basic Info
Statistics
  • Stars: 282
  • Watchers: 2
  • Forks: 33
  • Open Issues: 0
  • Releases: 0
Topics
atomic-css bulma bulma-framework bulma-helpers css css-framework flexbox functional-css sass scss
Created about 7 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

bulma-helpers logo

bulma-helpers

Library with missing Functional / Atomic CSS classes for Bulma framework, which doesn't require Bulma framework to work

npm

No installation (CDN)

You can use Bulma Helpers without installation directly from cdnjs. Just import file bulma-helpers.min.css:

html <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma-helpers/0.4.0/css/bulma-helpers.min.css" integrity="sha512-U6ELnUi7oqVEjkLmFw5r5UR5LEtvpImS/jUykBKneVhD0lxZxfJZ3k3pe003ktrtNZYungd9u3Urp2X09wKwXg==" crossorigin="anonymous" />

Link to library on cdnjs:

sh https://cdnjs.com/libraries/bulma-helpers

Quick install

Installation is nearly the same as pure Bulma framework.

NPM

sh npm install bulma-helpers or

Yarn

sh yarn add bulma-helpers

Import

After installation, you can import the CSS file into your project using this snippet:

sh import 'bulma-helpers/css/bulma-helpers.min.css'

Compatibility with Bulma

Bulma-helpers library complies with Bulma convention of naming classes. Most of classes are of the is-* and has-* type. Example: scss .is-borderless or scss .has-padding-top-5

One exception are pure Flexbox classes, which names just reflect modifiers. Example: scss .flex-row or scss .align-center

Compatibility with other CSS frameworks

You can use Bulma-helpers with any other CSS framework or even as a standalone library, if you want to write Functional / Atomic CSS code. Keep in mind that Bulma-helpers library bases on Sass, so you will need basic knowledge of Sass to customize the library.

CSS only

Bulma-helpers, equally to Bulma, is a CSS library. As such, the sole output is a single CSS file: bulma-helpers.css

You can either use that file, "out of the box", or download the Sass source files to customize the variables or choose which modules do you want to use.

There is no JavaScript included.

Browser Support

Bulma-helpers, equally to Bulma, uses autoprefixer to make (most) Flexbox features compatible with earlier browser versions. According to Can I use, Bulma is compatible with recent versions of:

  • Chrome
  • Edge
  • Firefox
  • Opera
  • Safari

Internet Explorer (10+) is only partially supported.

Customization

All modules are toggled on and all variables have some values by default. You can customize these values by assigning your values to variables, defined in the library. All available variables you can find in corresponding files in variables directory. Toggling off media queries (variables for this you can find in sass/helpers/variables/media-queries.sass, for example $enable-flex-media-queries) will decrease size of the library dramatically.

Instruction

  1. Make sure you have node-sass installed. If not, install it. (npm install node-sass --save-dev)
  2. Create script for compiliting SCSS to CSS, i.e. "customize-css": "node-sass --omit-source-map-url ./src/scss/bulma-helpers-customization.scss ./src/css/bulma-helpers-customization.css". Add this script to scripts section in package.json. As you can see in script, our file in which we will customize bulma-helpers is called bulma-helpers-customization.scss. The result CSS output will be in bulma-helpers-customization.css (notice the different extension of file).
  3. Create SCSS file in which you will customize bulma-helpers variables (i.e. scss/bulma-helpers-customization.scss)
  4. Define variables which you want to override, before importing bulma-helpers in created file.

Example content of file with customization: scss @charset "utf-8"; $sizing-range-start: 1; $sizing-range-end: 666; $sizing-interval: 6; @import "../../node_modules/bulma-helpers/bulma-helpers.sass"; 5. Run compiling script to build new css file, i.e. npm run customize-css 6. Import result file (in this example - bulma-helpers-customization.css) in your scss file, i.e. @import "css/bulma-helpers-customization.css";

Customizing unit

Default unit in code and in this README is px, but you can change it to any unit, for example em or rem. Change will be global for all helpers.

scss $default-unit: 'px' !default

Customizing ranges of generated classes

For all generated classes (such as has-margin-bottom-*, where * is value from given range) there is a simple way to change range and interval of generated classes. You can change the following variables in corresponding sass files. All variables follow the same pattern, shown below.

scss $sizing-range-start: 50 !default $sizing-range-end: 400 !default $sizing-interval: 50 !default

We've got name of customized value, such as sizing or spacing, then variable's meaning, such as range-start, range-end and interval.

For media queries, the rule is the same. The only difference is that rest of variable's name is preceded by mq.

scss $mq-sizing-range-start: 50 !default $mq-sizing-range-end: 400 !default $mq-sizing-interval: 50 !default

Customizing media queries

You can decide whether you want to include media queries in your project or not. In variables/media-queries.sass file you can find variables which allows you to customize your Bulma-helpers. All of defined variables are built on top of the following pattern:

scss $enable-media-queries: true !default

This variables enables/disables all media queries in the project.

For choosing certain modules, such as max/min width/height sizing media queries, you can assign a value to variables such as:

scss $enable-sizing-max-min-width-height-media-queries: true !default

Customizing breakpoints

Breakpoints are same as default breakpoints in Bulma. If you want to change them, then just override the same breakpoint variables as in Bulma, for example:

scss $tablet: 800px

Customizing spacing units

Units for the spacing and media query spacing helpers are using pixels by default. If you want to generate classes for additional units (such as rem or em), override the list of unit variables, which allows for a single unit or list of units. For example:

scss $additional-spacing-units: 'rem' 'em'

Generated spacing and media query classes for the above configuration will result in new spacing classes appended with -rem or -em. For example, has-margin-5-rem and has-margin-5-em.

Choosing modules

By default, all modules are included in result build. Even so, you can decide on your own which modules do you want to use in your project. To achieve this, you have to remove unwanted sass modules imports from main _all.sass files in helpers directory or remove single file imports from _all.sass in corresponding modules directories.

Documentation

All customization variables

```scss // --- MEDIA QUERIES // ALL $enable-media-queries: true !default // set to false if you don't want to include media queries at all

// spacing - MARGIN / PADDING $enable-spacing-media-queries: true !default // set to false if you don't want to include ALL MARGIN / PADDING media queries

// sizing - WIDTH / HEIGHT $enable-sizing-media-queries: true !default // set to false if you don't want to include ALL WIDTH / HEIGHT media queries $enable-sizing-width-height-media-queries: true !default // set to false if you don't want to include WIDTH / HEIGHT $enable-sizing-max-min-width-height-media-queries: true !default // set to false if you don't want to include MAX-WIDTH / MAX-HEIGHT / MIN-WIDTH / MIN-HEIGHT $enable-sizing-misc-media-queries: true !default // set to false if you don't want to include OTHERS

// flex $enable-flex-media-queries: true !default // set to false if you don't want to include FLEXBOX media queries $enable-flex-core-media-queries: true !default // set to false if you don't want to include FLEXBOX CORE $enable-flex-align-self-items-media-queries: true !default // set to false if you don't want to include ALIGN-SELF / ALIGN-ITEMS $enable-flex-align-justify-media-queries: true !default // set to false if you don't want to include ALIGN-CONTENT / JUSTIFY-CONTENT

// --- BREAKPOINTS - Default values of responsiveness breakpoints. They are equal to Bulma v0.7.2 breakpoints. // The container horizontal gap, which acts as the offset for breakpoints $gap: 64px !default // 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16 $tablet: 769px !default // 960px container + 4rem $desktop: 960px + (2 * $gap) !default // 1152px container + 4rem $widescreen: 1152px + (2 * $gap) !default $widescreen-enabled: true !default // 1344px container + 4rem $fullhd: 1344px + (2 * $gap) !default $fullhd-enabled: true !default

// --- WIDTH / HEIGHT $sizing-range-start: 50 !default // from this value WIDTH / HEIGHT classes will be generated (i.e. has-width-50) $sizing-range-end: 400 !default // to this value will be generated WIDTH / HEIGHT classes (i.e. has-height-400) $sizing-interval: 50 !default // this will be gap between previous and next class (i.e. has-width-50, has-width-100, has-width-150 and so on)

$sizing-max-min-width-height-range-start: $sizing-range-start !default // from this value MAX / MIN WIDTH / HEIGHT classes will be generated (i.e. has-max-width-50) $sizing-max-min-width-height-range-end: $sizing-range-end !default // to this value will be generated WIDTH / HEIGHT classes (i.e. has-min-height-400) $sizing-max-min-width-height-interval: $sizing-interval !default // this will be gap between previous and next class (i.e. has-min-width-50, has-min-width-100, has-min-width-150 and so on)

$mq-sizing-range-start: $sizing-range-start !default // from this value WIDTH / HEIGHT classes will be generated for media queries (i.e. .has-width-50-mobile) $mq-sizing-range-end: $sizing-range-end !default // to this value will be generated WIDTH / HEIGHT classes (i.e. has-height-400-tablet) $mq-sizing-interval: $sizing-interval !default // this will be gap between previous and next class (i.e. has-width-50-mobile, has-width-100-mobile, has-width-150-mobile and so on)

$mq-sizing-max-min-width-height-range-start: $sizing-max-min-width-height-range-start !default // from this value MAX / MIN WIDTH / HEIGHT classes will be generated for media queries (i.e. has-max-width-50-tablet) $mq-sizing-max-min-width-height-range-end: $sizing-max-min-width-height-range-end !default // to this value will be generated WIDTH / HEIGHT classes (i.e. has-min-height-400-fullhd) $mq-sizing-max-min-width-height-interval: $sizing-max-min-width-height-interval !default // this will be gap between previous and next class (i.e. has-min-width-50-fullhd, has-min-width-50-fullhd, has-min-width-50-fullhd and so on)

// --- MARGIN / PADDING $spacing-range-start: 5 !default // from this value MARGIN / PADDING classes will be generated (i.e. has-margin-5) $spacing-range-end: 150 !default // to this value will be generated MARGIN / PADDING classes (i.e. has-padding-150) $spacing-interval: 5 !default // this will be gap between previous and next class (i.e. has-padding-5, has-padding-10, has-padding-15 and so on)

$mq-spacing-range-start: $spacing-range-start !default // from this value MARGIN / PADDING classes will be generated for media queries (i.e. .has-margin-5-mobile) $mq-spacing-range-end: $spacing-range-end !default // to this value will be generated MARGIN / PADDING classes (i.e. has-padding-150-tablet) $mq-spacing-interval: $spacing-interval !default // this will be gap between previous and next class (i.e. has-padding-5-mobile, has-padding-10-mobile, has-padding-15-mobile and so on) $additional-spacing-units: () !default // this can be configured with additional unit type(s) to use for the spacing and media query spacing helpers

```

All values are represented by pixels with the exception for the spacing helpers, which allows for configuration of additional units, so e.g. has-max-width-50 class means that this element's maximal width is 50px.

Spacing

Margin

Margin

scss .has-margin-5 gives scss margin: 5px !important

Margin for one side

scss .has-margin-top-5 gives scss margin-top: 5px !important

All available sides
  1. top
  2. right
  3. bottom
  4. left
Default available spacing values

(5, 10, 15, ..., 150)

Padding

In the same way as above for margin.

Padding

scss .has-padding-5

Padding for one side

scss .has-padding-top-5

All available sides
  1. top
  2. right
  3. bottom
  4. left
Default available spacing values

(5, 10, 15, ..., 150)

Sizing

Width

scss .has-width-50 gives scss width: 50px !important

Height

scss .has-height-50

Default available sizing values

(50, 100, 150, ..., 400)

Max / min width / height

Max width

scss .has-max-width-50 gives scss width: 50px !important

Min height

scss .has-min-height-50 gives scss min-height: 50px !important

Default available sizing values

(50, 100, 150, ..., 400)

Fraction width / height

Full width

scss .is-full-width gives scss width: 100% !important

scss .is-half-height gives scss height: 50% !important

Default available sizing values

full (100%), half (50%), quarter (25%)

Full page width / height

Full page width

scss .has-page-width gives scss width: 100vw !important

Default available sizing values

full (100vw/vh), half (50vw/vh), quarter (25vw/vh)

Media queries

By default, media queries for sizing and spacing are toggled on. You can use media queries in exactly the same as in Bulma framework. Just add postfix to classname with breakpoints name, such as -mobile or -widescreen-only.

Default breakpoints

There are few defined breakpoints - mobile, tablet, tablet-only, touch, desktop, desktop-only, widescreen, widescreen-only, fullhd. Everything as in Bulma! You can read more here.

scss $gap: 64px !default $tablet: 769px !default $desktop: 960px + (2 * $gap) !default $widescreen: 1152px + (2 * $gap) !default $widescreen-enabled: true !default $fullhd: 1344px + (2 * $gap) !default $fullhd-enabled: true !default

Margin

Margin

scss .has-margin-5-mobile

Margin for one side

scss .has-margin-top-5-tablet

All available sides
  1. top
  2. right
  3. bottom
  4. left
Default available spacing values

(5, 10, 15, ..., 150)

Padding

In the same way as above for margin.

Padding

scss .has-padding-5-fullhd

Padding for one side

scss .has-padding-top-5-widescreen

All available sides
  1. top
  2. right
  3. bottom
  4. left
Default available spacing values

(5, 10, 15, ..., 150)

Flex

For all flex classes you can do all the responsive things. For example:

scss .flex-mobile

scss .justify-center-desktop

Sizing

Width

scss .has-width-50-touch

Height

scss .has-height-50-mobile

Default available sizing values

(50, 100, 150, ..., 400)

Max / min width / height

Max width

scss .has-max-width-50-desktop

Min height

scss .has-min-height-50-mobile

Default available sizing values

(50, 100, 150, ..., 400)

Fraction width / height

Full width

scss .is-full-width-tablet

scss .is-half-height-widescreen

Default available sizing values

full (100%), half (50%), quarter (25%)

Full page width / height

Full page width

scss .has-page-width-mobile

Default available sizing values

full (100vw/vh), half (50vw/vh), quarter (25vw/vh)

Flex

Names of classes reflect modifiers. There are modifiers for: 1. row 2. column 3. align-content 4. justify-content 5. align-self 6. align-items 7. wrap

Examples:

Row

scss .flex-row

Column

scss .flex-column

Align content start

scss .align-start

Justify content center

scss .justify-center

Align self baseline

scss .align-self-baseline

Align items flex-end

scss .align-items-flex-end

Nowrap

scss .nowrap

Border

Borderless

scss .is-borderless

Completely borderless

Makes cascade of borderless (applies lack of border to all tr, td and th in the table). scss .is-completely-borderless

Border width

scss .has-border-width-3 gives scss border-width: 3px !important

Border width for one side

scss .has-border-top-width-3 gives scss border-top-width: 3px !important

All available sides
  1. top
  2. right
  3. bottom
  4. left
Default available sizing values

(1, 2, 3, ..., 10)

Cursor

Cursor's style

scss .has-cursor-pointer gives scss cursor: pointer !important

All available cursors
  1. pointer
  2. grab
  3. help
  4. wait
  5. crosshair
  6. not-allowed
  7. zoom-in
  8. default

Misc

Blur

scss .is-blurred gives scss filter: blur(15px) !important

Blur medium

scss .is-blurred-medium gives scss filter: blur(40px) !important

Blur hard

scss .is-blurred-hard gives scss filter: blur(75px) !important

Default values for blurs

(15px, 40px, 75px)

Copyright and license

Code copyright 2018 Jędrzej Maczan. Code released under the MIT license. README bases on Bulma README file.

Owner

  • Name: Jędrzej Maczan
  • Login: jmaczan
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Maczan"
  given-names: "Jędrzej Paweł"
  orcid: "https://orcid.org/0000-0003-1741-6064"
title: "Bulma Helpers"
date-released: 2018-10-26
url: "https://github.com/jmaczan/bulma-helpers"

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 55
  • Total Committers: 10
  • Avg Commits per committer: 5.5
  • Development Distribution Score (DDS): 0.545
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
jmaczan j****n@g****m 25
jmaczan j****l@m****l 11
dependabot[bot] 4****] 7
Tim Cheung t****u@g****m 4
Marianne Feng f****e@g****m 2
Maczan J****n@d****m 2
Johann Schopplich 2****h 1
Daniel Devine d****e@d****t 1
Christopher Hedqvist c****t@r****e 1
Brandon b****n@t****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 13
  • Total pull requests: 19
  • Average time to close issues: 9 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 13
  • Total pull request authors: 7
  • Average comments per issue: 3.85
  • Average comments per pull request: 0.89
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 12
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • wanxe (1)
  • adriansalvatori (1)
  • nedjo (1)
  • de-raaf-media (1)
  • runyasak (1)
  • krystian50 (1)
  • mayowa (1)
  • codev0 (1)
  • baselakasha (1)
  • caffeinatedMike (1)
  • timster (1)
  • fherryfherry (1)
  • terabytesoftw (1)
Pull Request Authors
  • dependabot[bot] (12)
  • thattimc (2)
  • DDevine (1)
  • hedqvist (1)
  • mariannefeng (1)
  • Log1x (1)
  • johannschopplich (1)
Top Labels
Issue Labels
enhancement (9) question (1) wontfix (1)
Pull Request Labels
dependencies (12) bug (1)

Packages

  • Total packages: 2
  • Total downloads:
    • npm 10,289 last-month
  • Total docker downloads: 122
  • Total dependent packages: 18
    (may contain duplicates)
  • Total dependent repositories: 317
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 1
npmjs.org: bulma-helpers

Library with missing Functional / Atomic CSS classes for Bulma framework.

  • Versions: 22
  • Dependent Packages: 18
  • Dependent Repositories: 317
  • Downloads: 10,289 Last month
  • Docker Downloads: 122
Rankings
Dependent repos count: 0.9%
Dependent packages count: 1.3%
Downloads: 1.7%
Docker downloads count: 1.7%
Average: 2.3%
Stargazers count: 3.6%
Forks count: 4.4%
Maintainers (1)
Last synced: 5 months ago
repo1.maven.org: org.webjars.npm:bulma-helpers

WebJar for bulma-helpers

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 14.8%
Forks count: 17.9%
Average: 28.4%
Dependent repos count: 32.0%
Dependent packages count: 48.9%
Last synced: 4 months ago

Dependencies

package-lock.json npm
  • 283 dependencies
package.json npm
  • autoprefixer ^9.3.1 development
  • clean-css-cli ^4.2.1 development
  • node-sass ^4.12.0 development
  • postcss ^8.2.9 development
  • postcss-cli ^8.3.1 development
  • rimraf ^2.6.2 development