-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor CopyText component into CodeSnippet component * Update instances of code snippet * Force code snippet contents to wrap * Update changelog
- Loading branch information
alexpaxton
authored
Mar 1, 2019
1 parent
290d06f
commit 86f5753
Showing
9 changed files
with
166 additions
and
80 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
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
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,65 @@ | ||
@import 'src/style/modules'; | ||
/* | ||
Code Snippet Widget | ||
------------------------------------------------------------------------------ | ||
*/ | ||
|
||
.code-snippet { | ||
margin: $ix-marg-a 0; | ||
border-radius: $ix-radius; | ||
overflow: hidden; | ||
} | ||
|
||
.code-snippet--scroll { | ||
min-height: 26px !important; | ||
background-color: $g4-onyx; | ||
} | ||
|
||
.code-snippet--text { | ||
font-size: 13px; | ||
line-height: 20px; | ||
color: $c-potassium; | ||
font-weight: 600; | ||
font-family: $code-font; | ||
padding: $ix-marg-a $ix-marg-c; | ||
|
||
pre { | ||
display: inline-block; | ||
white-space: pre-wrap; | ||
} | ||
|
||
pre, | ||
code { | ||
word-wrap: break-word; | ||
word-break: break-all; | ||
} | ||
} | ||
|
||
.code-snippet--footer { | ||
background-color: rgba($g4-onyx, 0.5); | ||
display: flex; | ||
border-top: $ix-border solid $g5-pepper; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: $ix-marg-b $ix-marg-c; | ||
} | ||
|
||
.code-snippet--label { | ||
font-size: $ix-text-base; | ||
color: $g11-sidewalk; | ||
margin: 0; | ||
} | ||
|
||
.copy-button { | ||
position: absolute; | ||
right: $ix-marg-b; | ||
top: calc(50% - 15px); | ||
opacity: 0; | ||
transition: opacity 0.2s ease-in-out; | ||
} | ||
|
||
.script-snippet--container:hover { | ||
.copy-button { | ||
opacity: 1; | ||
} | ||
} |
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 was deleted.
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