-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New style for examples pages * Correct breadcrumb links * New design for code example pages * Update button design
- Loading branch information
Michiel Bijl
authored
Feb 18, 2017
1 parent
c4f2b7d
commit 18d9133
Showing
3 changed files
with
111 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,88 @@ | ||
[role="button"] { | ||
display: inline-block; | ||
padding: 5px 10px; | ||
border: 2px solid #555; | ||
position: relative; | ||
padding: .4em .7em; | ||
border: 1px solid hsl(213, 71%, 49%); | ||
border-radius: 5px; | ||
color: #000; | ||
background: #ddd; | ||
box-shadow: 0 1px 2px hsl(216, 27%, 55%); | ||
overflow: visible; | ||
color: #fff; | ||
text-shadow: 0 -1px 1px hsl(216, 27%, 25%); | ||
background: hsl(216, 82%, 51%); | ||
background-image: linear-gradient(to bottom, hsl(216, 82%, 53%), hsl(216, 82%, 47%)); | ||
} | ||
|
||
[role="button"]:hover, | ||
[role="button"]:focus { | ||
background-color: #eee; | ||
[role="button"]:hover { | ||
border-color: hsl(213, 71%, 29%); | ||
background: hsl(216, 82%, 31%); | ||
background-image: linear-gradient(to bottom, hsl(216, 82%, 33%), hsl(216, 82%, 27%)); | ||
cursor: default; | ||
outline: none; | ||
} | ||
|
||
[role="button"]:focus { | ||
outline: none; | ||
} | ||
|
||
[role="button"]:focus::before { | ||
position: absolute; | ||
z-index: -1; | ||
/* button border width - outline width - offset */ | ||
top: calc(-1px - 3px - 3px); | ||
right: calc(-1px - 3px - 3px); | ||
bottom: calc(-1px - 3px - 3px); | ||
left: calc(-1px - 3px - 3px); | ||
border: 3px solid hsl(213, 71%, 49%); | ||
/* button border radius + outline width + offset */ | ||
border-radius: calc(5px + 3px + 3px); | ||
content: ''; | ||
} | ||
|
||
[role="button"]:active { | ||
background-color: #bbb; | ||
border-color: hsl(213, 71%, 49%); | ||
background: hsl(216, 82%, 31%); | ||
background-image: linear-gradient(to bottom, hsl(216, 82%, 53%), hsl(216, 82%, 47%)); | ||
box-shadow: inset 0 3px 5px 1px hsl(216, 82%, 30%); | ||
} | ||
|
||
[role="button"][aria-pressed] { | ||
border-color: hsl(261, 71%, 49%); | ||
box-shadow: 0 1px 2px hsl(261, 27%, 55%); | ||
text-shadow: 0 -1px 1px hsl(261, 27%, 25%); | ||
background: hsl(261, 82%, 51%); | ||
background-image: linear-gradient(to bottom, hsl(261, 82%, 53%), hsl(261, 82%, 47%)); | ||
} | ||
|
||
[role="button"][aria-pressed]:hover { | ||
border-color: hsl(261, 71%, 29%); | ||
background: hsl(261, 82%, 31%); | ||
background-image: linear-gradient(to bottom, hsl(261, 82%, 33%), hsl(261, 82%, 27%)); | ||
cursor: default; | ||
} | ||
|
||
[role="button"][aria-pressed="true"] { | ||
color: #fff; | ||
background: #333; | ||
padding-top: .5em; | ||
padding-bottom: .3em; | ||
border-color: hsl(261, 71%, 49%); | ||
background: hsl(261, 82%, 31%); | ||
background-image: linear-gradient(to bottom, hsl(261, 82%, 63%), hsl(261, 82%, 57%)); | ||
box-shadow: inset 0 3px 5px 1px hsl(261, 82%, 30%); | ||
} | ||
|
||
[role="button"][aria-pressed="true"]:hover { | ||
border-color: hsl(261, 71%, 49%); | ||
background: hsl(261, 82%, 31%); | ||
background-image: linear-gradient(to bottom, hsl(261, 82%, 43%), hsl(261, 82%, 37%)); | ||
box-shadow: inset 0 3px 5px 1px hsl(261, 82%, 20%); | ||
} | ||
|
||
[role="button"][aria-pressed]:focus::before { | ||
border-color: hsl(261, 71%, 49%); | ||
} | ||
|
||
[role="button"] svg { | ||
margin: .15em auto -.15em; | ||
height: 1em; | ||
width: 1em; | ||
//vertical-align: middle; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters