- Grid
- Transitions .switcher
- theme-switcher.js
- Hide examples
This commit is contained in:
Lucas 2019-11-30 17:55:06 +07:00
parent 73237bdcd4
commit c3f9d8d8c8
9 changed files with 18 additions and 26 deletions

View file

@ -318,26 +318,21 @@ section {
* Minimal grid system with auto-layout columns * Minimal grid system with auto-layout columns
*/ */
.grid { .grid {
grid-column-gap: 1rem;
grid-row-gap: 1rem;
display: grid;
grid-template-columns: 1fr;
margin: 0; margin: 0;
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.grid { .grid {
grid-column-gap: 1rem;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr)); grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
} }
} }
.grid > * { .grid > * {
min-width: 0; min-width: 0;
margin-bottom: 1rem;
}
@media (min-width: 992px) {
.grid > * {
margin-bottom: 0;
}
} }
/** /**

2
css/pico.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -507,7 +507,7 @@ button.switcher i {
button.switcher:hover, button.switcher:focus { button.switcher:hover, button.switcher:focus {
max-width: 100%; max-width: 100%;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
} }
button.switcher:hover::after { button.switcher:hover::after {

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@
<li>Documentation</li> <li>Documentation</li>
</ul> </ul>
<ul> <ul>
<li><a href="#" class="secondary">Examples</a></li> <!--<li><a href="https://picocss.com#examples" class="secondary">Examples</a></li>-->
<li><a href="#docs" class="secondary">Docs</a></li> <li><a href="#docs" class="secondary">Docs</a></li>
<li> <li>
<a href="https://github.com/picocss/pico" class="contrast" aria-label="Pico GitHub repository"> <a href="https://github.com/picocss/pico" class="contrast" aria-label="Pico GitHub repository">

File diff suppressed because one or more lines are too long

View file

@ -66,7 +66,6 @@
// Click Listener on Switcher // Click Listener on Switcher
var switchers = document.querySelectorAll(switcher.selector); var switchers = document.querySelectorAll(switcher.selector);
console.log(switchers);
for (var i = 0; i < switchers.length; i++) { for (var i = 0; i < switchers.length; i++) {
switchers[i].addEventListener('click', function(event) { switchers[i].addEventListener('click', function(event) {

View file

@ -39,8 +39,11 @@ button.switcher {
&:hover, &:hover,
&:focus { &:focus {
max-width: 100%; max-width: 100%;
transition: background-color $transition, transition:
color $transition; background-color $transition,
border-color $transition,
color $transition,
box-shadow $transition;
} }
&:hover { &:hover {

View file

@ -6,25 +6,20 @@
*/ */
.grid { .grid {
grid-column-gap: $spacing-gutter;
grid-row-gap: $spacing-gutter;
display: grid;
grid-template-columns: 1fr;
margin: 0; margin: 0;
@if map-get($breakpoints, "lg") { @if map-get($breakpoints, "lg") {
@media (min-width: map-get($breakpoints, "lg")) { @media (min-width: map-get($breakpoints, "lg")) {
grid-column-gap: $spacing-gutter;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr)); grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
} }
} }
& > * { & > * {
min-width: 0; // HACK for childs in overflow min-width: 0; // HACK for childs in overflow
margin-bottom: $spacing-gutter;
@if map-get($breakpoints, "md") {
@media (min-width: map-get($breakpoints, "lg")) {
margin-bottom: 0;
}
}
} }
} }
} }