1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 21:29:41 +02:00
codex.docs/src/frontend/styles/components/page.pcss

345 lines
5.9 KiB
Text
Raw Normal View History

.page {
font-size: 15px;
line-height: 1.6;
letter-spacing: 0.005em;
&__header {
display: flex;
color: var(--color-text-second);
@media (--mobile) {
font-size: 13px;
}
&-nav {
color: inherit;
text-decoration: none;
@media (--mobile) {
display: none;
}
&:hover {
color: var(--color-link-active);
}
&:not(:last-of-type) {
&::after {
content: '»';
margin: 0 0.7em 0 0.45em;
}
}
}
&-time {
margin-left: auto;
@media (--mobile) {
margin-left: 0;
}
}
&-button {
@apply --button;
@apply --button-primary;
padding: 5px 10px;
font-size: 13px;
margin-left: 10px;
}
}
&__title {
@apply --font-serif;
font-size: 35px;
font-weight: 900;
letter-spacing: -0.04em;
margin-bottom: -0.1em;
}
2019-02-18 10:42:12 +03:00
.cdx-marker {
background: rgba(245,235,111,0.33);
padding: 3px 0;
}
2019-02-18 11:15:03 +03:00
.inline-code {
display: inline-block;
background: rgba(251,241,241,0.78);
color: #C44545;
padding: 0.1em 0.5em;
border-radius: 2px;
margin: 0 2px;
font-family: Menlo, Monaco, Consolas, Courier New, monospace;
font-size: 0.84em;
line-height: 1.4em;
}
2019-02-18 11:15:03 +03:00
&__content {
a {
text-decoration: none;
border-bottom: 1px solid #000;
padding-bottom: 1px;
color: inherit;
&:hover {
color: var(--color-link-active);
border-bottom-color: var(--color-link-active);
}
.inline-code {
margin: 0;
padding: 0.15em .5em;
border-bottom: 1px dashed rgba(84, 151, 255, 0.99);
color: #1f6fd8;
background-color: #daf1fe;
&:hover {
background-color: #c8edfe;
}
}
2019-02-18 11:15:03 +03:00
}
}
}
/**
* Paragraph
* ==================
*/
.block-paragraph {
.inline-code {
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
}
}
/**
* Header
* ==================
*/
.block-header {
@apply --font-serif;
margin: 2.1em 0 0.5em;
&--2 {
font-size: 22px;
font-weight: 600;
}
&--3 {
font-size: 18px;
font-weight: 600;
}
& + p {
margin-top: 0.5em;
}
a {
text-decoration: none !important;
border: 0;
color: inherit !important;
}
&--anchor {
cursor: pointer;
&::before {
position: absolute;
content: '';
margin-left: -30px;
width: 14px;
height: 19px;
margin-top: 0.35em;
background-image: url("data:image/svg+xml,%3Csvg width='14' height='19' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237B7E89' fill-rule='nonzero'%3E%3Cpath d='M8.58 11.997L2.283 5.701a1.762 1.762 0 0 1 0-2.49l.933-.935a1.762 1.762 0 0 1 2.49 0l6.298 6.297a3.508 3.508 0 0 0-.901-3.39L6.952 1.031a3.522 3.522 0 0 0-4.982 0l-.933.933a3.522 3.522 0 0 0 0 4.982l4.151 4.151c.92.92 2.218 1.208 3.392.9z'/%3E%3Cpath d='M12.958 11.628l-4.151-4.15a3.507 3.507 0 0 0-3.391-.899l6.296 6.296a1.76 1.76 0 0 1 0 2.49l-.933.936a1.764 1.764 0 0 1-2.49 0l-6.296-6.298a3.507 3.507 0 0 0 .899 3.39l4.151 4.15a3.522 3.522 0 0 0 4.982 0l.933-.935a3.52 3.52 0 0 0 0-4.98z'/%3E%3C/g%3E%3C/svg%3E");
opacity: 0;
transform: translateX(5px);
will-change: opacity, transform;
transition: all 100ms ease;
@media (--mobile){
display: none !important;
}
}
&:hover {
color: #4c4c58;
}
&:hover::before{
opacity: 1;
transform: none;
}
}
}
/**
* Code
* ==================
*/
.block-code {
background: var(--color-bg-light);
border: 1px solid #f1f1f4;
2019-02-18 10:42:12 +03:00
border-radius: 5px;
font-family: var(--font-mono);
line-height: 1.7em;
font-size: 13px;
&__content {
white-space: pre;
word-wrap: normal;
overflow-x: auto;
background: transparent !important;
padding: 15px !important;
color: #41314e !important;
}
.hljs-name,
.hljs-section{
color: #359f3f;
}
.hljs-tag {
color: #718c77;
}
.hljs-attr,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-selector-pseudo,
.hljs-title {
color: #904eb3;
}
.hljs-emphasis,
.hljs-quote,
.hljs-string,
.hljs-strong,
.hljs-template-variable,
.hljs-variable {
color: #c21f04;
}
}
/**
* List
* ==================
*/
.block-list {
margin: 20px 0;
li {
margin: 10px 0;
}
}
/**
* Image
* ==================
*/
.block-image {
margin: 40px auto;
text-align: center;
&__content {
img, video {
vertical-align: bottom;
max-width: 100%;
}
&--stretched {
max-width: none !important;
width: calc(100% + 120px) !important;
margin-left: -60px;
img, video {
width: 100%;
}
}
&--bordered {
img, video {
border: 3px solid var(--color-line-gray);
box-sizing: border-box;
}
}
&--with-background {
padding: 15px;
background: var(--color-bg-light);
img, video {
max-width: 60%;
margin: 0 auto;
}
}
}
&__caption {
margin: 1em auto;
color: var(--color-text-second);
}
}
/**
* Delimiter
* ==================
*/
.block-delimiter {
line-height: 1.6em;
width: 100%;
text-align: center;
&::before {
display: inline-block;
content: "***";
font-size: 30px;
line-height: 65px;
height: 30px;
letter-spacing: 0.2em;
}
}
2019-03-12 17:24:20 +03:00
/**
* Table
* ==================
*/
.block-table {
margin: 20px 0;
table-layout: fixed;
width: 100%;
border-radius: 3px;
border-collapse: collapse;
border: 1px solid var(--color-line-gray);
td {
padding: 8px 10px;
border: 1px solid var(--color-line-gray);
}
}
/**
* Warning
* ==================
*/
.block-warning {
display: flex;
padding: 20px;
margin: 30px 0;
border-radius: 7px;
background: #fff9ef;
color: #392e2f;
&__icon {
margin-right: 15px;
}
&__title {
font-weight: bold;
}
&__message {
padding-left: 15px;
}
}