Skip to content

Commit

Permalink
perf: remove color stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Jul 23, 2024
1 parent bdd2e5e commit 0afb095
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 35 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/husky.sh"

npx --no-install commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

./node_modules/.bin/npm-run-all preCommit test linters postinstall
4 changes: 1 addition & 3 deletions src/auro-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { LitElement, html } from "lit";

import styleCss from "./style-css.js";
import colorCss from "./color-css.js";
import tokensCss from "./tokens-css.js";

import { styleMap } from 'lit/directives/style-map.js';
Expand Down Expand Up @@ -61,7 +60,6 @@ export class AuroBackground extends LitElement {
static get styles() {
return [
styleCss,
colorCss,
tokensCss
];
}
Expand Down Expand Up @@ -95,7 +93,7 @@ export class AuroBackground extends LitElement {
// function that renders the HTML and CSS into the scope of the component
render() {
const styles = {
'--background': this.bg || 'var(--ds-auro-background-color)',
'--background': this.bg || 'var(--ds-auro-container-color)',
'--backgroundSm': this.bgSm || 'var(--background)',
'--backgroundMd': this.bgMd || 'var(--backgroundSm)',
'--backgroundLg': this.bgLg || 'var(--backgroundMd)',
Expand Down
25 changes: 0 additions & 25 deletions src/color.scss

This file was deleted.

8 changes: 8 additions & 0 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,32 @@

padding: var(--inset);

background: var(--background);

@include auro_breakpoint--sm {
width: var(--widthSm);
height: var(--heightSm);

padding: var(--insetSm);

background: var(--backgroundSm);
}

@include auro_breakpoint--md {
width: var(--widthMd);
height: var(--heightMd);

padding: var(--insetMd);

background: var(--backgroundMd);
}

@include auro_breakpoint--lg {
width: var(--widthLg);
height: var(--heightLg);

padding: var(--insetMd);

background: var(--backgroundLg);
}
}
2 changes: 1 addition & 1 deletion src/tokens.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import './../node_modules/@aurodesignsystem/design-tokens/dist/tokens/SCSSVariables';

:host {
--ds-auro-background-color: transparent;
--ds-auro-container-color: transparent;
}

0 comments on commit 0afb095

Please sign in to comment.