astro-color-mode
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.7.1](https://github.com/JulianCataldo/web-garden/compare/astro-color-mode@0.7.0...astro-color-mode@0.7.1) (2023-01-05) | ||
### Bug Fixes | ||
- color mode scoping for root html element ([7fbbd48](https://github.com/JulianCataldo/web-garden/commit/7fbbd48f7a1faa4a8d75cd2221607548ad4cd5e8)) | ||
## [0.7.0](https://github.com/JulianCataldo/web-garden/compare/astro-color-mode@0.6.0...astro-color-mode@0.7.0) (2022-11-19) | ||
@@ -8,0 +14,0 @@ |
{ | ||
"name": "astro-color-mode", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Provides system or user-defined color scheme preference, with a toggle mechanism. Settings are persisted, component is progressively enhanced and flash of unstyled content avoided. Also, it will provide an easier way to target theme with CSS / SCSS / JS.", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "23d62d6f4898153f17aec78147fb4b22ac9aedb0" | ||
"gitHead": "6b367b0e5f718cc1bcd52f40ca1f680343e3008c" | ||
} |
# 🚀 Astro — Color mode, with user override | ||
[![NPM](https://img.shields.io/npm/v/@julian_cataldo/astro-color-mode)](https://www.npmjs.com/package/@julian_cataldo/astro-color-mode) | ||
![Downloads](https://img.shields.io/npm/dt/@julian_cataldo/astro-color-mode.svg) | ||
[![ISC License](https://img.shields.io/npm/l/@julian_cataldo/astro-color-mode)](https://github.com/JulianCataldo/web-garden/blob/develop/LICENSE) | ||
[![NPM](https://img.shields.io/npm/v/astro-color-mode)](https://www.npmjs.com/package/astro-color-mode) | ||
![Downloads](https://img.shields.io/npm/dt/astro-color-mode.svg) | ||
[![ISC License](https://img.shields.io/npm/l/astro-color-mode)](https://github.com/JulianCataldo/web-garden/blob/develop/LICENSE) | ||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com) | ||
@@ -99,11 +99,26 @@ [![Astro](https://img.shields.io/badge/Astro-333333.svg?logo=astro)](https://astro.build) | ||
```scss | ||
span { | ||
.my-layout { | ||
:is(.my-link, body) { | ||
@include color-mode(light) { | ||
color: black; | ||
background-color: white; | ||
// ... | ||
} | ||
@include color-mode(dark) { | ||
color: white; | ||
background-color: black; | ||
// ... | ||
} | ||
} | ||
} | ||
.some-class { | ||
@include color-mode(light) { | ||
color: black; | ||
background-color: white; | ||
color: blue; | ||
background-color: yellow; | ||
// ... | ||
} | ||
@include color-mode(dark) { | ||
color: white; | ||
background-color: black; | ||
color: yellow; | ||
background-color: blue; | ||
// ... | ||
@@ -110,0 +125,0 @@ } |
Sorry, the diff of this file is not supported yet
12604
153