Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jloh/bulma-prefers-dark

Bulma prefers dark theme
https://github.com/jloh/bulma-prefers-dark

bulma bulma-css bulma-extension dark-theme prefers-color-scheme

Last synced: 3 months ago
JSON representation

Bulma prefers dark theme

Awesome Lists containing this project

README

        

# bulma-prefers-dark

![Safari screenshot](.github/safari-screenshot.png)

> Bulma now supports dark mdoe out of the box, this repo is no longer maintained
> See the docs https://bulma.io/documentation/features/dark-mode/

A Bulma extension that adds support for the `prefers-color-scheme: dark` media query

[![npm](https://img.shields.io/npm/v/bulma-prefers-dark.svg)](https://www.npmjs.com/package/bulma-prefers-dark)
[![npm](https://img.shields.io/npm/dm/bulma-prefers-dark.svg)](https://www.npmjs.com/package/bulma-prefers-dark)

## Installation

```
npm install bulma-prefers-dark
... Or ...
yarn add bulma-prefers-dark
```

## Usage

This extension works as-is in combination with Bulma by adding an alternative dark theme via the `@media (prefers-color-scheme: dark)` [media query](https://caniuse.com/#search=prefers-color-scheme).

Include it in your SaSS pipeline after you've included Bulma and you're good to go:

```scss
@import "../../node_modules/bulma/bulma.sass";
@import "../../bulma-prefers-dark/bulma-prefers-dark.sass";
```

Alternatively include it in your HTML via unpkg:

```html

```

## Copyright & License

Code copyright 2019 James Loh. Code released under the [MIT license](LICENSE).