django-rest-framework/css/copy-button.css

31 lines
677 B
CSS

.copy-block-button {
position: absolute;
top: 6px;
right: 6px;
z-index: 10;
white-space: nowrap; /* Prevent text wrap */
}
/* Ensure the PRE container provides positioning context */
pre {
position: relative;
padding-top: 35px; /* Room for the button */
overflow-x: auto; /* Allow horizontal scrolling */
}
/* Code block scrollable */
pre code {
display: block;
overflow-x: auto;
}
/*
The MkDocs/DRF theme injects a <span> inside buttons and applies
a text color that overrides btn-inverse defaults.
This override is intentionally scoped and limited to color only.
*/
.copy-block-button,
.copy-block-button span {
color: #ffffff !important;
}