Skip to content

Commit

Permalink
Add show, hide, fix text decoratione
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Mar 7, 2024
1 parent cb06aac commit a6f4dd7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/docs/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ import Layout from "../layouts/Layout.astro";
</a>
</li>
</ul>
<h3>Or as button</h3>
<button class="card fill no-decoration p-xs">Button</button>
</div>
<div id="input" class="big-section">
<h2>Input</h2>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@linwooddev/style",
"description": "",
"main": "index.js",
"version": "0.3.0",
"version": "0.3.1",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "sass --watch scss/:css/",
Expand Down
2 changes: 2 additions & 0 deletions packages/web/scss/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
border-width: 1px;
border-color: colors.$elevation;
transition: all 0.2s ease-in-out;
text-decoration: none;
&.secondary {
border-color: colors.$elevation;
}
Expand All @@ -27,6 +28,7 @@
&.fill, &.paper {
backdrop-filter: vars.$elevation-filter;
background-color: colors.$elevation;
color: colors.$background-text;
}
&.paper {
border: 0;
Expand Down
13 changes: 13 additions & 0 deletions packages/web/scss/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@
overflow-x: auto;
}

@each $breakpoint, $value in vars.$breakpoints {
@container (max-width: #{$value}) {
.show-#{$breakpoint} {
display: none;
}
}
@container (min-width: #{$value}) {
.hide-#{$breakpoint} {
display: none;
}
}
}

@each $breakpoint, $value in vars.$sizing {
.w-#{$breakpoint} {
width: $value;
Expand Down
8 changes: 6 additions & 2 deletions packages/web/scss/_typo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ b {
}
a, .link {
color: colors.$primary;
text-decoration: underline;
}
nav a {
margin-right: 10px;
Expand Down Expand Up @@ -127,17 +128,20 @@ hr, .v-divider {
background-color: colors.$elevation;
}

.no-decoration {
.no-decoration, .no-decoration:hover {
text-decoration: none;
}

.bold {
font-weight: bold;
}

.normal-color {
.text {
color: colors.$background-text;
}
.primary {
color: colors.$primary;
}

.invert {
filter: invert(100%);
Expand Down
4 changes: 2 additions & 2 deletions packages/web/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@forward 'vars';
@use 'colors';
@use 'typo';
@use 'layout';
@use 'card';
@use 'input';
@use 'button';
@use 'hero';
@use 'layout';
@use 'nav';
@use 'typo';

0 comments on commit a6f4dd7

Please sign in to comment.