Skip to content

Commit

Permalink
styles
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightjack committed Jul 31, 2021
1 parent a6a8e73 commit dfc5d9e
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Time Zone Converter

## Resources
> A simple date and time converted.
- [YUI 3.18.1 Documentation](http://yssl.org/lib/yui/docs/)
## Stack

- [YUI 3.18.1](https://github.com/yui/yui3) ([Working Documentation](http://yssl.org/lib/yui/docs/))
- [Day.js](https://day.js.org/) & [tzdb](https://github.com/vvo/tzdb)
- [Feather Icons](https://feathericons.com/)
- [Vite](https://vitejs.dev/)
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ <h1 class="u-visually-hidden">Time Zones</h1>
list="timezone-data"
type="text"
id="tz-name"
required
placeholder="Add a new timezone..."
autocomplete="off"
/>
Expand Down
6 changes: 6 additions & 0 deletions src/css/components/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
transition: background-color 200ms ease-out;
border: 0;
border-radius: var(--size-border-radius-s);
outline: 0;
background-color: var(--color-background-action);
color: var(--color-text-action);
font-weight: var(--font-weight-semibold);
cursor: pointer;
gap: var(--s-1);
}

.c-button:focus-visible:focus {
outline: 2px solid var(--color-background-action);
outline-offset: 2px;
}

.c-button:where(:hover, :focus) {
background-color: var(--color-background-action-active);
}
19 changes: 18 additions & 1 deletion src/css/components/field.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,31 @@
row-gap: var(--s-1);
}

.c-field::after,
.c-field::before {
content: '';
display: block;
grid-area: input;
border-radius: var(--size-border-radius-s);
pointer-events: none;
}

.c-field::before {
padding: var(--s-1) var(--s-2);
border-radius: var(--size-border-radius-s);
opacity: 0.1;
background-color: currentColor;
pointer-events: none;
}

.c-field::after {
transition: opacity 100ms ease-out;
border: 2px solid currentColor;
opacity: 0;
}

.c-field:focus-within::after {
border: 2px solid currentColor;
opacity: 0.5;
}

.c-field__input {
Expand All @@ -29,6 +45,7 @@
min-width: 0;
padding: var(--s-1) var(--s-2);
border: 0;
outline: 0;
background-color: transparent;
color: inherit;
font-family: inherit;
Expand Down
1 change: 1 addition & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ html {

body {
min-height: 100%;
background-color: var(--color-background-canvas);
}
3 changes: 2 additions & 1 deletion src/css/tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* Palette */
--color-white: 0, 0%, 100%;
--color-gray-800: 0, 0%, 22%;
--color-gray-50: 0, 0%, 96%;
--color-blue-700: 220, 49%, 35%;
--color-blue-600: 205, 64%, 43%;
--color-blue-500: 202, 50%, 47%;
Expand All @@ -10,7 +11,7 @@
--color-yellow-300: 43, 90%, 72%;

/* UI colors */
--color-background-canvas: hsl(var(--color-white));
--color-background-canvas: hsl(var(--color-gray-50));
--color-background-primary: hsl(var(--color-gray-800));
--color-background-action: hsl(var(--color-yellow-400));
--color-background-action-active: hsl(var(--color-yellow-300));
Expand Down

0 comments on commit dfc5d9e

Please sign in to comment.