primevue-mirror/apps/showcase/assets/styles/layout/_doc.scss

481 lines
11 KiB
SCSS
Raw Normal View History

2024-05-29 22:40:50 +00:00
@mixin mark() {
border-radius: 6px;
padding: 2px 6px;
2024-06-13 05:58:21 +00:00
font-size: 1rem;
2024-05-29 22:40:50 +00:00
font-weight: 500;
font-style: normal;
background: var(--mark-background);
color: var(--mark-text);
}
.mark {
@include mark();
}
2023-02-28 08:29:30 +00:00
.doc-tabmenu {
list-style: none;
margin: 0;
2023-10-13 22:09:30 +00:00
padding: 0;
2023-02-28 08:29:30 +00:00
display: flex;
margin-bottom: 2rem;
overflow: auto;
position: relative;
&:after {
display: block;
position: absolute;
bottom: 0;
width: 100%;
2024-02-11 21:25:50 +00:00
border-bottom: 1px solid var(--border-color);
content: '';
}
2023-02-28 08:29:30 +00:00
li {
position: relative;
z-index: 1;
2024-04-24 22:43:32 +00:00
2023-02-28 08:29:30 +00:00
button {
background-color: transparent;
border: 0 none;
display: block;
2024-11-09 07:56:55 +00:00
padding-block: 0 1rem;
2024-10-31 17:01:54 +00:00
padding-inline: 2rem;
2023-02-28 08:29:30 +00:00
text-align: center;
2024-02-10 08:57:04 +00:00
color: var(--text-color);
2023-10-12 09:58:41 +00:00
font-size: 1rem;
letter-spacing: 1px;
2023-02-28 08:29:30 +00:00
cursor: pointer;
margin: 0;
2024-02-11 21:25:50 +00:00
transition: outline-color 0.2s, border-color 0.2s;
outline-color: transparent;
2023-02-28 08:29:30 +00:00
border-bottom: 1px solid transparent;
2024-10-31 17:01:54 +00:00
border-start-end-radius: 6px;
border-start-start-radius: 6px;
2023-07-25 14:06:34 +00:00
white-space: nowrap;
2024-04-02 07:44:31 +00:00
--p-focus-ring-offset: -1px;
2024-07-25 06:24:30 +00:00
@include focus-visible();
2023-02-28 08:29:30 +00:00
&:hover {
2024-02-11 21:25:50 +00:00
border-bottom-color: var(--hover-border-color);
2023-02-28 08:29:30 +00:00
}
&:focus {
outline: 0 none;
}
2023-10-13 22:48:19 +00:00
2023-02-28 08:29:30 +00:00
}
&.doc-tabmenu-active {
button {
2024-02-11 21:25:50 +00:00
border-bottom-color: var(--primary-text-color);
color: var(--primary-text-color);
2023-02-28 08:29:30 +00:00
}
}
}
2023-08-03 19:53:56 +00:00
&::-webkit-scrollbar {
display: none;
}
2023-02-28 08:29:30 +00:00
}
.doc-tabpanel,
.doc {
display: flex;
}
.doc-main {
flex-grow: 1;
flex-shrink: 1;
flex-basis: 0;
min-width: 0;
}
.doc-intro {
2023-10-06 17:23:12 +00:00
margin-bottom: 1.5rem;
2023-02-28 08:29:30 +00:00
p {
2024-06-12 22:21:46 +00:00
font-size: 1.25rem;
2023-10-06 17:23:12 +00:00
margin: 0;
a {
@include doc-link();
}
2023-02-28 08:29:30 +00:00
}
}
.doc-link {
@include doc-link();
}
2023-02-28 08:29:30 +00:00
.doc-section-label {
display: flex;
align-items: center;
scroll-margin-top: 6.5rem;
> a {
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-02-28 08:29:30 +00:00
opacity: 0.7;
2024-10-31 17:01:54 +00:00
margin-inline-start: 1rem;
2023-02-28 08:29:30 +00:00
display: none;
2024-02-11 21:25:50 +00:00
transition: outline-color 0.2s, border-color 0.2s, opacity 0.2s;
outline-color: transparent;
border-radius: 6px;
@include focus-visible();
2023-02-28 08:29:30 +00:00
}
2024-04-24 22:43:32 +00:00
> .doc-section-label-badge {
2024-10-31 17:01:54 +00:00
margin-inline-start: 0.5rem;
2024-04-24 22:43:32 +00:00
}
&:has(.doc-section-label-badge) {
line-height: 1;
}
2023-02-28 08:29:30 +00:00
&:hover {
> a {
display: block;
&:hover {
opacity: 1;
}
}
}
}
.doc-section-description {
> p {
2024-06-12 22:21:46 +00:00
font-size: 1.125rem;
2023-02-28 08:29:30 +00:00
i {
2024-05-29 22:40:50 +00:00
@include mark();
2023-02-28 08:29:30 +00:00
}
a {
@include doc-link();
2023-02-28 08:29:30 +00:00
}
}
2024-06-13 05:58:21 +00:00
li {
font-size: 1.125rem;
}
2024-04-29 09:18:36 +00:00
}
2023-10-15 10:00:23 +00:00
2024-04-29 09:18:36 +00:00
.doc-notification {
line-height: 1.5;
padding: 1rem;
font-weight: 500;
border-radius: 10px;
background: var(--mark-background);
color: var(--mark-text);
2024-06-13 05:48:27 +00:00
margin-bottom: 1rem;
2023-02-28 08:29:30 +00:00
}
.doc-section-nav {
position: sticky;
2023-10-09 07:21:14 +00:00
top: 6rem;
2023-02-28 08:29:30 +00:00
right: 0;
width: 14rem;
max-height: calc(100vh - 15rem);
list-style: none;
margin: 0;
2024-10-31 17:01:54 +00:00
padding-block: 0.25rem;
padding-inline: 0;
margin-inline-start: 4rem;
2023-02-28 08:29:30 +00:00
overflow-y: auto;
overflow-x: hidden;
align-self: flex-start;
> .navbar-item {
.navbar-item-content {
2024-10-24 14:52:43 +00:00
border-inline-start: 1px solid var(--border-color);
padding-inline-start: .25rem;
2023-09-16 12:01:29 +00:00
transition: all .2s;
&:hover {
2024-10-24 14:52:43 +00:00
border-inline-start-color: var(--hover-border-color);
2023-09-16 12:01:29 +00:00
}
2023-02-28 08:29:30 +00:00
}
}
.navbar-item {
> .navbar-item-content {
display: flex;
2024-03-28 14:34:15 +00:00
button {
font-size: 1rem;
2024-10-24 14:52:43 +00:00
text-align: start;
2024-03-28 14:34:15 +00:00
background: transparent;
margin: 0;
border: 0 none;
2024-10-24 14:52:43 +00:00
padding-block: 0.25rem;
padding-inline: 1rem;
2024-03-28 14:34:15 +00:00
color: var(--text-secondary-color);
2023-02-28 08:29:30 +00:00
white-space: nowrap;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
2024-02-11 21:25:50 +00:00
transition: outline-color 0.2s, border-color .2s;
outline-color: transparent;
2024-03-28 14:34:15 +00:00
cursor: pointer;
user-select: none;
2024-04-02 07:44:31 +00:00
--p-focus-ring-offset: -1px;
2024-07-25 06:24:30 +00:00
@include focus-visible();
2023-09-16 12:01:29 +00:00
}
2023-02-28 08:29:30 +00:00
2023-09-16 12:01:29 +00:00
&:hover {
2024-03-28 14:34:15 +00:00
button {
2024-02-10 08:57:04 +00:00
color: var(--text-color);
2023-02-28 08:29:30 +00:00
}
}
}
&.active-navbar-item {
> .navbar-item-content {
2024-02-11 21:25:50 +00:00
border-color: var(--primary-text-color);
2023-02-28 08:29:30 +00:00
2024-03-28 14:34:15 +00:00
button {
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-02-28 08:29:30 +00:00
}
}
}
ul {
list-style: none;
margin: 0;
padding: 0;
.navbar-item {
.navbar-item-content {
2024-10-24 14:52:43 +00:00
padding-inline-start: 1rem;
2023-02-28 08:29:30 +00:00
}
}
}
}
}
2024-04-24 22:43:32 +00:00
.doc-section-code {
2023-10-15 06:00:52 +00:00
position: relative;
2024-04-24 22:43:32 +00:00
2023-10-15 06:00:52 +00:00
div {
&::-webkit-scrollbar {
width: 5px;
}
}
&:not(:last-child) {
margin-bottom: 1rem;
}
&:hover {
.doc-section-code-buttons {
display: flex;
}
}
}
2023-10-15 04:50:22 +00:00
2023-08-17 13:05:28 +00:00
.doc-section-code-buttons {
2023-10-15 04:50:22 +00:00
position: absolute;
align-items: center;
justify-content: end;
z-index: 1;
top: .75rem;
right: .75rem;
2023-10-15 13:50:53 +00:00
gap: .5rem;
2023-10-15 06:00:52 +00:00
display: none;
background: rgba(255,255,255,.05);
border-radius: 10px;
2023-10-15 13:50:53 +00:00
padding: 2px;
2023-10-15 10:13:22 +00:00
backdrop-filter: blur(6px);
2023-10-15 13:50:53 +00:00
border: 1px solid rgba(255, 255, 255, .1);
2024-04-24 22:43:32 +00:00
2023-10-15 04:50:22 +00:00
button {
outline: 0 none;
2023-10-16 08:20:00 +00:00
border-radius: 8px;
2023-10-15 04:50:22 +00:00
outline-offset: 0;
background-color: transparent;
transition: background-color .2s, box-shadow .2s;
border: 0 none;
2024-02-11 21:25:50 +00:00
color: var(--code-button-text-color);
2023-10-15 04:50:22 +00:00
cursor: pointer;
&:hover {
2024-02-07 12:14:37 +00:00
background-color: rgba(255,255,255,.1);
2024-02-11 21:25:50 +00:00
color: var(--code-button-text-color);
2023-10-15 04:50:22 +00:00
}
2023-10-15 06:00:52 +00:00
&.code-active {
color: #bbf7d0;
}
2023-08-17 13:05:28 +00:00
}
2023-08-16 14:34:47 +00:00
}
2023-02-28 08:29:30 +00:00
.doc-section-code-tooltip .p-tooltip-text {
padding: 0.5rem;
font-size: 11px;
}
.doc-tablewrapper {
overflow: auto;
}
.doc-table {
border-collapse: collapse;
width: 100%;
min-width: 960px;
margin-bottom: 1.5rem;
th {
2024-02-11 21:25:50 +00:00
border-bottom: 1px solid var(--border-color);
2024-10-31 17:01:54 +00:00
padding-block: .75rem;
padding-inline: 1rem;
text-align: start;
2023-02-28 08:29:30 +00:00
text-transform: capitalize;
}
tbody {
tr:hover {
2024-02-11 21:25:50 +00:00
background: var(--hover-background);
2023-02-28 08:29:30 +00:00
}
td {
2024-10-31 17:01:54 +00:00
padding-block: .75rem;
padding-inline: 1rem;
2024-02-11 21:25:50 +00:00
border-bottom: 1px solid var(--border-color);
2023-10-06 18:43:54 +00:00
white-space: pre-line;
2023-02-28 08:29:30 +00:00
line-height: 1.5;
2023-03-06 10:59:56 +00:00
scroll-margin-top: 6.5rem;
2023-02-28 08:29:30 +00:00
2023-10-06 18:43:54 +00:00
&:first-child {
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-10-06 18:43:54 +00:00
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
2023-10-15 04:50:22 +00:00
font-weight: 600;
2023-10-06 18:43:54 +00:00
}
2023-10-06 14:29:31 +00:00
.doc-option-type {
2023-02-28 08:29:30 +00:00
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-09-20 17:52:07 +00:00
font-weight: 500;
2023-02-28 08:29:30 +00:00
.doc-option-type-options-container {
display: flex;
align-items: center;
}
2023-10-06 18:43:54 +00:00
&.doc-option-link {
&:hover {
text-decoration: underline;
}
}
2023-02-28 08:29:30 +00:00
}
2024-10-03 17:55:50 +00:00
.doc-option-name, i:not(.pi) {
2023-09-21 11:22:01 +00:00
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
2023-02-28 08:29:30 +00:00
position: relative;
scroll-margin-top: 6.5rem;
2024-02-11 21:25:50 +00:00
background-color: var(--mark-background);
color: var(--mark-text);
2023-02-28 08:29:30 +00:00
border-radius: 6px;
2024-10-31 17:01:54 +00:00
padding-block: 2px;
padding-inline: 6px;
2023-10-06 18:43:54 +00:00
font-weight: 600;
2023-02-28 08:29:30 +00:00
font-style: normal;
2023-10-06 18:43:54 +00:00
white-space: nowrap;
2023-02-28 08:29:30 +00:00
.doc-option-link {
position: absolute;
top: 0;
right: -1.5rem;
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-02-28 08:29:30 +00:00
opacity: 0.7;
display: none;
transition: opacity 0.3s, colors 0.3s;
}
}
2023-10-06 18:43:54 +00:00
&:hover {
.doc-option-name {
.doc-option-link {
display: inline;
&:hover {
opacity: 1;
}
}
}
}
2023-10-06 12:57:46 +00:00
.doc-option-default,
.doc-option-returnType {
2023-10-06 18:43:54 +00:00
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
font-weight: 400;
font-style: normal;
2023-09-20 17:52:07 +00:00
display: flex;
border-width: 1px;
border-style: solid;
border-radius: 6px;
2024-10-31 17:01:54 +00:00
padding-block: 2px;
padding-inline: 6px;
2023-09-20 17:52:07 +00:00
max-width: min-content;
2024-02-11 21:25:50 +00:00
border-color: var(--border-color);
background-color: var(--card-background);
2024-02-10 08:57:04 +00:00
color: var(--text-secondary-color);
2023-09-20 17:52:07 +00:00
}
2023-10-06 18:43:54 +00:00
.doc-option-parameter-name {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
}
2023-02-28 08:29:30 +00:00
2023-10-06 18:43:54 +00:00
.doc-option-parameter-type {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
2024-02-11 21:25:50 +00:00
color: var(--primary-text-color);
2023-10-06 18:43:54 +00:00
}
.doc-option-params {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, Liberation Mono, monospace;
2023-02-28 08:29:30 +00:00
}
}
}
}
2024-09-16 08:23:41 +00:00
.doc-ptviewerwrapper {
display: flex;
flex-direction: row;
padding: 0 !important;
.doc-ptviewer {
display: flex;
align-items: center;
justify-content: center;
2024-09-17 10:20:40 +00:00
border-color: var(--border-color);
2024-09-16 08:23:41 +00:00
border-width: 0 1px 0 0;
padding: 1rem;
width: 75%;
}
.doc-ptoptions {
display: flex;
flex-direction: column;
gap: .5rem;
padding: .5rem;
width: 25%;
max-height: 720px;
overflow-y: auto;
.doc-ptoption {
display: flex;
flex-direction: column;
padding: .5rem;
&:hover {
2024-09-17 10:20:40 +00:00
background-color: var(--hover-background);
2024-09-16 08:23:41 +00:00
}
2024-09-17 10:20:40 +00:00
.doc-ptoption-text:hover {
cursor: default;
2024-09-16 08:23:41 +00:00
}
}
}
}