mirror of
https://github.com/picocss/pico.git
synced 2025-04-27 11:36:14 -04:00
Documentation
This commit is contained in:
parent
0b93083ca1
commit
34e330a537
18 changed files with 2920 additions and 0 deletions
51
docs/scss/components/_card-code.scss
Normal file
51
docs/scss/components/_card-code.scss
Normal file
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Docs: Code inside <article>
|
||||
*/
|
||||
|
||||
// Custom spacings
|
||||
article pre {
|
||||
margin-top: $spacing-block;
|
||||
margin-bottom: -$spacing-gutter*2;
|
||||
|
||||
@if map-get($breakpoints, "sm") and
|
||||
map-get($spacing-factor, "sm") {
|
||||
|
||||
@media (min-width: map-get($breakpoints, "sm")) {
|
||||
padding: $spacing-block ($spacing-block*map-get($spacing-factor, "sm"));
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "md") and
|
||||
map-get($spacing-factor, "md") and
|
||||
$enable-responsive-spacings {
|
||||
|
||||
@media (min-width: map-get($breakpoints, "md")) {
|
||||
padding: $spacing-block ($spacing-block*map-get($spacing-factor, "md"));
|
||||
margin: -$spacing-block*map-get($spacing-factor, "md");
|
||||
margin-top: $spacing-block*map-get($spacing-factor, "md");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "lg") and
|
||||
map-get($spacing-factor, "lg") and
|
||||
$enable-responsive-spacings {
|
||||
|
||||
@media (min-width: map-get($breakpoints, "lg")) {
|
||||
padding: $spacing-block ($spacing-block*map-get($spacing-factor, "lg"));
|
||||
margin: -$spacing-block*map-get($spacing-factor, "lg");
|
||||
margin-top: $spacing-block*map-get($spacing-factor, "lg");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "xl") and
|
||||
map-get($spacing-factor, "xl") and
|
||||
$enable-responsive-spacings {
|
||||
|
||||
@media (min-width: map-get($breakpoints, "xl")) {
|
||||
padding: $spacing-block ($spacing-block*map-get($spacing-factor, "xl"));
|
||||
margin: -$spacing-block*map-get($spacing-factor, "xl");
|
||||
margin-top: $spacing-block*map-get($spacing-factor, "xl");
|
||||
}
|
||||
}
|
||||
}
|
45
docs/scss/components/_nav.scss
Normal file
45
docs/scss/components/_nav.scss
Normal file
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* Docs: Navs
|
||||
*/
|
||||
|
||||
body > nav {
|
||||
-webkit-backdrop-filter: saturate(180%) blur(20px);
|
||||
z-index: 99;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
backdrop-filter: saturate(180%) blur(20px);
|
||||
background-color: var(--nav-background);
|
||||
box-shadow: 0px 1px 0 var(--nav-border);
|
||||
|
||||
li a {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
ul:first-of-type li {
|
||||
|
||||
// Brand
|
||||
&:first-of-type {
|
||||
a {
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
margin-left: -$spacing-gutter;
|
||||
padding: 0;
|
||||
background: var(--h1);
|
||||
color: var(--background);
|
||||
}
|
||||
}
|
||||
|
||||
// Title
|
||||
&:nth-of-type(2) {
|
||||
display: none;
|
||||
margin-left: $spacing-gutter;
|
||||
color: var(--muted-text);
|
||||
|
||||
@media (min-width: map-get($breakpoints, "lg")) {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
70
docs/scss/components/_theme-switcher.scss
Normal file
70
docs/scss/components/_theme-switcher.scss
Normal file
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* Docs: Theme switcher
|
||||
*/
|
||||
|
||||
button.switcher {
|
||||
position: fixed;
|
||||
right: $spacing-gutter/2;
|
||||
bottom: $spacing-gutter;
|
||||
width: auto;
|
||||
max-width: 1rem + $spacing-gutter*2;
|
||||
margin-bottom: 0;
|
||||
padding: .75rem;
|
||||
border-radius: 2rem;
|
||||
line-height: 1;
|
||||
text-align: right;
|
||||
box-shadow: var(--card-shadow);
|
||||
|
||||
&::after {
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border: 2px solid currentColor;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, currentColor 0%, currentColor 50%, transparent 50%);
|
||||
vertical-align: bottom;
|
||||
content: '';
|
||||
transition: transform $transition;
|
||||
}
|
||||
|
||||
i {
|
||||
display: inline-block;
|
||||
max-width: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
font-size: .875rem;
|
||||
font-style: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
max-width: 100%;
|
||||
transition: max-width $transition,
|
||||
background-color $transition,
|
||||
color $transition;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
||||
&::after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
i {
|
||||
max-width: 100%;
|
||||
padding: 0 ($spacing-gutter/2) 0 ($spacing-gutter/4);
|
||||
transition: max-width $transition,
|
||||
padding $transition;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: var(--card-shadow),
|
||||
0 0 0 0.2rem var(--secondary-focus);
|
||||
}
|
||||
|
||||
@media (min-width: map-get($breakpoints, "sm")) {
|
||||
right: $spacing-gutter;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue