mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 19:06:40 +02:00
Update look and feel of examples and copy buttons
This commit is contained in:
@@ -18,20 +18,21 @@
|
|||||||
|
|
||||||
.btn-clipboard {
|
.btn-clipboard {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: .65rem;
|
top: .35rem;
|
||||||
right: .65rem;
|
right: .5rem;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: block;
|
display: block;
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
@include font-size(.65em);
|
@include font-size(.75em);
|
||||||
color: $primary;
|
color: $gray-700;
|
||||||
background-color: $white;
|
user-select: none;
|
||||||
border: 1px solid;
|
background-color: transparent;
|
||||||
|
border: 0;
|
||||||
@include border-radius();
|
@include border-radius();
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: $white;
|
color: $gray-900;
|
||||||
background-color: $primary;
|
background-color: $gray-200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -83,6 +83,8 @@
|
|||||||
@include border-top-radius(.25rem);
|
@include border-top-radius(.25rem);
|
||||||
|
|
||||||
+ .bd-clipboard + .highlight {
|
+ .bd-clipboard + .highlight {
|
||||||
|
border-top: 0;
|
||||||
|
@include border-top-radius(0);
|
||||||
@include border-bottom-radius(.25rem);
|
@include border-bottom-radius(.25rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,18 +289,20 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
.highlight {
|
.highlight {
|
||||||
padding: 1rem;
|
position: relative;
|
||||||
|
padding: 3.5rem 1rem 0;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
overflow: auto;
|
||||||
background-color: $gray-100;
|
background-color: $gray-100;
|
||||||
|
border: 1px solid $gray-300;
|
||||||
|
|
||||||
@include media-breakpoint-up(sm) {
|
@include media-breakpoint-up(sm) {
|
||||||
padding: 1rem 1.5rem;
|
@include border-radius(.25rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
padding: 0;
|
padding: 0 0 1rem;
|
||||||
margin-top: .65rem;
|
margin-bottom: .5rem;
|
||||||
margin-bottom: .65rem;
|
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
@@ -320,3 +324,26 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bd-example-multiple-langs + .bd-clipboard + .highlight {
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
@include border-bottom-radius(0);
|
||||||
|
}
|
||||||
|
.highlight + .bd-clipboard + .highlight {
|
||||||
|
@include border-top-radius(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-lang]::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: .5rem 1rem;
|
||||||
|
@include font-size(.875rem);
|
||||||
|
color: $gray-700;
|
||||||
|
text-transform: uppercase;
|
||||||
|
content: attr(data-lang);
|
||||||
|
user-select: none;
|
||||||
|
border-bottom: 1px solid $gray-300;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user