1
0
mirror of https://github.com/jdan/98.css.git synced 2025-08-22 13:33:22 +02:00

finish porting button styles

This commit is contained in:
Jordan Scales
2020-04-16 11:56:39 -04:00
parent d4b7bd62a3
commit c588dee988
2 changed files with 28 additions and 84 deletions

View File

@@ -2,31 +2,22 @@
<html> <html>
<head> <head>
<link rel="stylesheet" href="./style.css?t=1"></style> <link rel="stylesheet" href="./style.css?t=1"></style>
<style>
body {
height: 100vh;
margin: 0;
padding: 0;
background: var(--button-face);
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head> </head>
<body> <body>
<div style="padding: 20px">
<button>
Hello, world!
</button>
</div>
<div style="padding: 20px">
<div class="sunken-outer">
<div class="sunken-inner button-face" style="padding: 12px">Hello, world!</div>
</div>
</div>
<!--
<fieldset> <fieldset>
<button> <button><u>H</u>ello, world!</button>
<u>D</u>isplay <button disabled>Unavailable</button>
</button>
<button>
<u>P</u>rint...
</button>
<button disabled>
Cancel
</button>
</fieldset> </fieldset>
-->
</body> </body>
</html> </html>

View File

@@ -5,54 +5,6 @@
--window-frame: #0a0a0a; --window-frame: #0a0a0a;
} }
button {
border: none;
background: var(--button-face);
padding: 12px;
box-shadow: -1px -1px 0 1px var(--button-highlight),
0 0 0 2px var(--window-frame), inset -2px -2px var(--button-shadow),
inset 2px 2px var(--button-face);
}
button:active {
box-shadow: -1px -1px 0 1px var(--window-frame),
0 0 0 2px var(--button-highlight), inset -2px -2px var(--button-face),
inset 2px 2px var(--button-shadow);
}
button:focus {
outline: 1px dotted #000000;
outline-offset: -2px;
}
.raised-outer {
box-shadow: -1px -1px 0 1px var(--button-highlight),
0 0 0 2px var(--window-frame);
}
.raised-inner {
box-shadow: inset -2px -2px var(--button-shadow),
inset 2px 2px var(--button-face);
}
.button-face {
background-color: var(--button-face);
}
.sunken-outer {
}
.sunken-inner {
box-shadow: ;
}
body {
height: 100vh;
margin: 0;
padding: 0;
background: var(--button-face);
}
* { * {
/* Hmmmm... how can I make these a webfont */ /* Hmmmm... how can I make these a webfont */
font-family: "MS Sans Serif", Arial; font-family: "MS Sans Serif", Arial;
@@ -61,23 +13,30 @@ body {
color: #222222; color: #222222;
} }
/*
u { u {
text-decoration: none; text-decoration: none;
border-bottom: 1px solid #222222; border-bottom: 0.5px solid #222222;
} }
button { button {
background: #c0c0c0;
padding: 4px 10px;
border: none; border: none;
box-shadow: -0.5px -0.5px 0 0.5px #c0c0c0, 0 0 0 1px #808080, background: var(--button-face);
-0.5px -0.5px 0 1.5px #ffffff, 0 0 0 2px #0a0a0a; padding: 6px 8px;
/* Make these shadows into a mixin */
box-shadow: -0.5px -0.5px 0 0.5px var(--button-highlight),
0 0 0 1px var(--window-frame), inset -1px -1px var(--button-shadow),
inset 1px 1px var(--button-face);
} }
button:active { button:active {
box-shadow: -0.5px -0.5px 0 0.5px #808080, 0 0 0 1px #c0c0c0, box-shadow: -0.5px -0.5px 0 0.5px var(--window-frame),
-0.5px -0.5px 0 1.5px #0a0a0a, 0 0 0 2px #ffffff; 0 0 0 1px var(--button-highlight), inset -1px -1px var(--button-face),
inset 1px 1px var(--button-shadow);
}
button:focus {
outline: 1px dotted #000000;
outline-offset: -3px;
} }
button:disabled { button:disabled {
@@ -85,11 +44,6 @@ button:disabled {
text-shadow: 1px 1px 0 #eeeeee; text-shadow: 1px 1px 0 #eeeeee;
} }
button:focus {
outline: 1px dotted #000000;
outline-offset: -2px;
}
fieldset { fieldset {
border: none; border: none;
} }
@@ -101,4 +55,3 @@ fieldset > * {
fieldset > *:last-child { fieldset > *:last-child {
margin: 0; margin: 0;
} }
*/