Split copy from code styling
This commit is contained in:
parent
7fe413d720
commit
15d2639736
@ -5,43 +5,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contains-copy-button {
|
||||
position: relative;
|
||||
|
||||
.copy-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
content: '\f328';
|
||||
color: rgba($text-color, 0.75);
|
||||
|
||||
font-family: 'Font Awesome 6 Free';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::after {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.copy-successful {
|
||||
&::after {
|
||||
content: '\f46c'
|
||||
}
|
||||
}
|
||||
|
||||
&.copy-failed {
|
||||
&::after {
|
||||
content: '\f00d'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,3 +19,4 @@
|
||||
@import "pagination";
|
||||
@import "list";
|
||||
@import "code";
|
||||
@import "copy";
|
||||
|
||||
39
assets/sass/copy.scss
Normal file
39
assets/sass/copy.scss
Normal file
@ -0,0 +1,39 @@
|
||||
.contains-copy-button {
|
||||
position: relative;
|
||||
|
||||
.copy-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
content: '\f328';
|
||||
color: rgba($text-color, 0.75);
|
||||
|
||||
font-family: 'Font Awesome 6 Free';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::after {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.copy-successful {
|
||||
&::after {
|
||||
content: '\f46c'
|
||||
}
|
||||
}
|
||||
|
||||
&.copy-failed {
|
||||
&::after {
|
||||
content: '\f00d'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user