mirror of
https://github.com/picocss/pico.git
synced 2025-04-20 08:45:06 -04:00
chore: replace @import
with @use
This commit is contained in:
parent
a6f0d0ca74
commit
51a68ce0fc
39 changed files with 1197 additions and 1659 deletions
|
@ -1,4 +1,6 @@
|
|||
@if ($enable-class-container and $enable-classes) {
|
||||
@use "../settings";
|
||||
|
||||
@if (settings.$enable-class-container and settings.$enable-classes) {
|
||||
/**
|
||||
* Container
|
||||
*/
|
||||
|
@ -13,29 +15,29 @@
|
|||
}
|
||||
|
||||
.container {
|
||||
@if map-get($breakpoints, "sm") {
|
||||
@media (min-width: map-get($breakpoints, "sm")) {
|
||||
max-width: map-get($viewports, "sm");
|
||||
@if map-get(settings.$breakpoints, "sm") {
|
||||
@media (min-width: map-get(settings.$breakpoints, "sm")) {
|
||||
max-width: map-get(settings.$viewports, "sm");
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "md") {
|
||||
@media (min-width: map-get($breakpoints, "md")) {
|
||||
max-width: map-get($viewports, "md");
|
||||
@if map-get(settings.$breakpoints, "md") {
|
||||
@media (min-width: map-get(settings.$breakpoints, "md")) {
|
||||
max-width: map-get(settings.$viewports, "md");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "lg") {
|
||||
@media (min-width: map-get($breakpoints, "lg")) {
|
||||
max-width: map-get($viewports, "lg");
|
||||
@if map-get(settings.$breakpoints, "lg") {
|
||||
@media (min-width: map-get(settings.$breakpoints, "lg")) {
|
||||
max-width: map-get(settings.$viewports, "lg");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "xl") {
|
||||
@media (min-width: map-get($breakpoints, "xl")) {
|
||||
max-width: map-get($viewports, "xl");
|
||||
@if map-get(settings.$breakpoints, "xl") {
|
||||
@media (min-width: map-get(settings.$breakpoints, "xl")) {
|
||||
max-width: map-get(settings.$viewports, "xl");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
@if ($enable-classes and $enable-grid) {
|
||||
@use "../settings";
|
||||
|
||||
@if (settings.$enable-classes and settings.$enable-grid) {
|
||||
/**
|
||||
* Grid
|
||||
* Minimal grid system with auto-layout columns
|
||||
|
@ -11,8 +13,8 @@
|
|||
grid-template-columns: 1fr;
|
||||
margin: 0;
|
||||
|
||||
@if map-get($breakpoints, "lg") {
|
||||
@media (min-width: map-get($breakpoints, "lg")) {
|
||||
@if map-get(settings.$breakpoints, "lg") {
|
||||
@media (min-width: map-get(settings.$breakpoints, "lg")) {
|
||||
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@use "../settings";
|
||||
|
||||
/**
|
||||
* Sectioning
|
||||
* Container and responsive spacings for header, main, footer
|
||||
|
@ -17,7 +19,7 @@ main {
|
|||
// ––––––––––––––––––––
|
||||
|
||||
// 1. Remove the margin in all browsers (opinionated)
|
||||
#{$semantic-root-element} {
|
||||
#{settings.$semantic-root-element} {
|
||||
width: 100%;
|
||||
margin: 0; // 1
|
||||
|
||||
|
@ -29,34 +31,34 @@ main {
|
|||
margin-left: auto;
|
||||
|
||||
// Semantic container
|
||||
@if $enable-semantic-container {
|
||||
@if settings.$enable-semantic-container {
|
||||
padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
|
||||
|
||||
// Centered viewport
|
||||
@if $enable-viewport {
|
||||
@if map-get($breakpoints, "sm") and $enable-viewport {
|
||||
@media (min-width: map-get($breakpoints, "sm")) {
|
||||
max-width: map-get($viewports, "sm");
|
||||
@if settings.$enable-viewport {
|
||||
@if map-get(settings.$breakpoints, "sm") and settings.$enable-viewport {
|
||||
@media (min-width: map-get(settings.$breakpoints, "sm")) {
|
||||
max-width: map-get(settings.$viewports, "sm");
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "md") and $enable-viewport {
|
||||
@media (min-width: map-get($breakpoints, "md")) {
|
||||
max-width: map-get($viewports, "md");
|
||||
@if map-get(settings.$breakpoints, "md") and settings.$enable-viewport {
|
||||
@media (min-width: map-get(settings.$breakpoints, "md")) {
|
||||
max-width: map-get(settings.$viewports, "md");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "lg") and $enable-viewport {
|
||||
@media (min-width: map-get($breakpoints, "lg")) {
|
||||
max-width: map-get($viewports, "lg");
|
||||
@if map-get(settings.$breakpoints, "lg") and settings.$enable-viewport {
|
||||
@media (min-width: map-get(settings.$breakpoints, "lg")) {
|
||||
max-width: map-get(settings.$viewports, "lg");
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($breakpoints, "xl") and $enable-viewport {
|
||||
@media (min-width: map-get($breakpoints, "xl")) {
|
||||
max-width: map-get($viewports, "xl");
|
||||
@if map-get(settings.$breakpoints, "xl") and settings.$enable-viewport {
|
||||
@media (min-width: map-get(settings.$breakpoints, "xl")) {
|
||||
max-width: map-get(settings.$viewports, "xl");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue