Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DmmDGM committed Jul 19, 2024
1 parent d468167 commit 98f2639
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 37 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
out/
tests/
test.html
tests/
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
v1.0.1 | July 19th, 2024
- Added b, hr, and i template styling.
- Limited --sd-forest to d35.
- Removed themes

v1.0.0 | July 19th, 2024
- Added basic features
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Option 2: Download from releases.

### Enabling soda.css templates

Use the `--sd-light` or `--sd-dark` attribute on your `html` tag like so:
Use the `--sd` attribute on your `html` tag like so:

```html
<!DOCTYPE html>
<html lang="en" --sd-light>
<html lang="en" --sd>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down
6 changes: 3 additions & 3 deletions src/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $colors: (
#efbf8f: ( "name": "sand" ),
#efbf4f: ( "name": "peach" ),
#bfef8f: ( "name": "mint-green" ),
#0f8f4f: ( "name": "forest" ),
#0f8f4f: ( "name": "forest", "darken": 7 ),
#8fefef: ( "name": "mint-blue" ),
#efbfbf: ( "name": "cherry-blossom" ),
);
Expand All @@ -30,7 +30,7 @@ $colors: (
@mixin define($name, $color, $lighten, $darken) {
// Defines default values
@if $lighten == null { $lighten: 3; }
@if $darken == null { $darken: 10 }
@if $darken == null { $darken: 10; }

// Defines lightened variants
@if $lighten != 0 {
Expand All @@ -41,7 +41,7 @@ $colors: (
}

// Defines base variant
--sd-#{$name}: #{$color};
--sd-#{$name}: $color;

// Defines darkened variants
@if $darken != 0 {
Expand Down
11 changes: 0 additions & 11 deletions src/_themes.scss

This file was deleted.

33 changes: 14 additions & 19 deletions src/soda.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Imports
@use "sass:map";
@use "./colors";
@use "./themes";

// Defines colors
:root {
Expand All @@ -17,13 +16,15 @@
}

// Defines reset pattern
%reset {
html[--sd] {
height: 100vh;
width: 100%;

* {
background: none;
border: none;
color: var(--sd-black);
scrollbar-color: var(--sd-white) var(--sd-black);
font: normal normal normal 15px / 20px sans-serif;
list-style: none;
margin: 0px;
Expand All @@ -34,26 +35,20 @@
}

body {
background-color: var(--sd-white);
height: 100%;
width: 100%;
}
}

// Applies themes
@each $theme in map.keys(themes.$themes) {
$background: map.get(themes.$themes, $theme, "background");
$foreground: map.get(themes.$themes, $theme, "foreground");
b {
font-weight: bold;
}

html[--sd-#{$theme}] {
@extend %reset;
hr {
border: 1px solid var(--sd-black);
}

* {
color: $foreground;
scrollbar-color: $background $foreground;
}

body {
background-color: $background;
}
}
}
i {
font-style: italic;
}
}

0 comments on commit 98f2639

Please sign in to comment.