-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace github-corners with element and css structure. #97
- Loading branch information
1 parent
a89f35f
commit 855820f
Showing
9 changed files
with
256 additions
and
241 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.github-fork-ribbon { | ||
width: 12.1em; | ||
height: 12.1em; | ||
position: fixed; | ||
overflow: hidden; | ||
top: 0; | ||
right: 0; | ||
z-index: 9999; | ||
pointer-events: none; | ||
font-size: 13px; | ||
text-decoration: none; | ||
text-indent: -999999px; | ||
} | ||
|
||
.github-fork-ribbon.fixed { | ||
position: fixed; | ||
} | ||
|
||
.github-fork-ribbon:hover, .github-fork-ribbon:active { | ||
background-color: rgba(0, 0, 0, 0.0); | ||
} | ||
|
||
.github-fork-ribbon:before, .github-fork-ribbon:after { | ||
/* The right and left classes determine the side we attach our banner to */ | ||
position: absolute; | ||
display: block; | ||
width: 15.38em; | ||
height: 1.54em; | ||
|
||
top: 3.23em; | ||
right: -3.23em; | ||
|
||
-webkit-box-sizing: content-box; | ||
-moz-box-sizing: content-box; | ||
box-sizing: content-box; | ||
|
||
-webkit-transform: rotate(45deg); | ||
-moz-transform: rotate(45deg); | ||
-ms-transform: rotate(45deg); | ||
-o-transform: rotate(45deg); | ||
transform: rotate(45deg); | ||
} | ||
|
||
.github-fork-ribbon:before { | ||
content: ""; | ||
|
||
/* Add a bit of padding to give some substance outside the "stitching" */ | ||
padding: .38em 0; | ||
|
||
/* Set the base colour */ | ||
background-color: #a00; | ||
|
||
/* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ | ||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15))); | ||
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); | ||
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); | ||
background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); | ||
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); | ||
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)); | ||
|
||
/* Add a drop shadow */ | ||
-webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); | ||
-moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); | ||
box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5); | ||
|
||
pointer-events: auto; | ||
} | ||
|
||
.github-fork-ribbon:after { | ||
/* Set the text from the data-ribbon attribute */ | ||
content: attr(data-ribbon); | ||
|
||
/* Set the text properties */ | ||
color: #fff; | ||
font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
line-height: 1.54em; | ||
text-decoration: none; | ||
text-shadow: 0 -.08em rgba(0, 0, 0, 0.5); | ||
text-align: center; | ||
text-indent: 0; | ||
|
||
/* Set the layout properties */ | ||
padding: .15em 0; | ||
margin: .15em 0; | ||
|
||
/* Add "stitching" effect */ | ||
border-width: .08em 0; | ||
border-style: dotted; | ||
border-color: #fff; | ||
border-color: rgba(255, 255, 255, 0.7); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
a:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; } | ||
svg { z-index: 99; position: fixed; border: 0px; top: 0px; right: 0; } | ||
@media (max-width:500px) { | ||
a:hover .octo-arm { animation: none; } | ||
.octo-arm { animation: octocat-wave 560ms ease-in-out; } | ||
} | ||
|
||
@keyframes octocat-wave { | ||
0%, 100% { transform: rotate(0); } | ||
20%, 60% { transform: rotate(-25deg); } | ||
40%, 80% { transform: rotate(10deg); } | ||
} |
Oops, something went wrong.