| 1 | package Web::PerlDistSite::Component::MainScss; | ||
| 2 | |||
| 3 | our $VERSION = '0.001010'; | ||
| 4 | |||
| 5 | use Moo; | ||
| 6 | use Web::PerlDistSite::Common -lexical, -all; | ||
| 7 | |||
| 8 | with 'Web::PerlDistSite::Component'; | ||
| 9 | |||
| 10 | sub filename ( $self ) { | ||
| 11 | return '_build/main.scss'; | ||
| 12 | } | ||
| 13 | |||
| 14 | sub raw_content ( $self ) { | ||
| 15 | state $content = do { local $/ = <DATA> }; | ||
| 16 | if ( $self->project->root->child( 'custom.scss' )->is_file ) { | ||
| 17 | return $content . qq{\n\@import "../custom";\n\n} | ||
| 18 | } | ||
| 19 | return $content; | ||
| 20 | } | ||
| 21 | |||
| 22 | 1; | ||
| 23 | |||
| 24 | __DATA__ | ||
| 25 | // 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) | ||
| 26 | @import "../node_modules/bootstrap/scss/functions"; | ||
| 27 | |||
| 28 | // 2. Include any default variable overrides here | ||
| 29 | @import "variables"; | ||
| 30 | |||
| 31 | // 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets) | ||
| 32 | @import "../node_modules/bootstrap/scss/variables"; | ||
| 33 | |||
| 34 | // 4. Include any default map overrides here | ||
| 35 | |||
| 36 | // 5. Include remainder of required parts | ||
| 37 | @import "../node_modules/bootstrap/scss/maps"; | ||
| 38 | @import "../node_modules/bootstrap/scss/mixins"; | ||
| 39 | @import "../node_modules/bootstrap/scss/root"; | ||
| 40 | @import "../node_modules/bootstrap/scss/utilities"; | ||
| 41 | |||
| 42 | $sizes: ( | ||
| 43 | 25: 25%, | ||
| 44 | 50: 50%, | ||
| 45 | 75: 75%, | ||
| 46 | 100: 100%, | ||
| 47 | 60px: 60px, | ||
| 48 | 80px: 80px, | ||
| 49 | 100px: 100px, | ||
| 50 | auto: auto | ||
| 51 | ); | ||
| 52 | |||
| 53 | @each $breakpoint in map-keys($grid-breakpoints) { | ||
| 54 | @include media-breakpoint-up($breakpoint) { | ||
| 55 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints); | ||
| 56 | @each $prop, $abbrev in (width: w, height: h) { | ||
| 57 | @each $size, $length in $sizes { | ||
| 58 | .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | // 6. Optionally include any other parts as needed | ||
| 65 | @import "../node_modules/bootstrap/scss/reboot"; | ||
| 66 | @import "../node_modules/bootstrap/scss/type"; | ||
| 67 | @import "../node_modules/bootstrap/scss/images"; | ||
| 68 | @import "../node_modules/bootstrap/scss/containers"; | ||
| 69 | @import "../node_modules/bootstrap/scss/grid"; | ||
| 70 | @import "../node_modules/bootstrap/scss/helpers"; | ||
| 71 | @import "../node_modules/bootstrap/scss/tables"; | ||
| 72 | @import "../node_modules/bootstrap/scss/forms"; | ||
| 73 | @import "../node_modules/bootstrap/scss/buttons"; | ||
| 74 | @import "../node_modules/bootstrap/scss/transitions"; | ||
| 75 | @import "../node_modules/bootstrap/scss/dropdown"; | ||
| 76 | @import "../node_modules/bootstrap/scss/button-group"; | ||
| 77 | @import "../node_modules/bootstrap/scss/nav"; | ||
| 78 | @import "../node_modules/bootstrap/scss/navbar"; | ||
| 79 | @import "../node_modules/bootstrap/scss/card"; | ||
| 80 | @import "../node_modules/bootstrap/scss/accordion"; | ||
| 81 | @import "../node_modules/bootstrap/scss/breadcrumb"; | ||
| 82 | @import "../node_modules/bootstrap/scss/pagination"; | ||
| 83 | @import "../node_modules/bootstrap/scss/badge"; | ||
| 84 | @import "../node_modules/bootstrap/scss/alert"; | ||
| 85 | @import "../node_modules/bootstrap/scss/progress"; | ||
| 86 | @import "../node_modules/bootstrap/scss/list-group"; | ||
| 87 | @import "../node_modules/bootstrap/scss/close"; | ||
| 88 | @import "../node_modules/bootstrap/scss/toasts"; | ||
| 89 | @import "../node_modules/bootstrap/scss/modal"; | ||
| 90 | @import "../node_modules/bootstrap/scss/tooltip"; | ||
| 91 | @import "../node_modules/bootstrap/scss/popover"; | ||
| 92 | @import "../node_modules/bootstrap/scss/carousel"; | ||
| 93 | @import "../node_modules/bootstrap/scss/spinners"; | ||
| 94 | @import "../node_modules/bootstrap/scss/offcanvas"; | ||
| 95 | @import "../node_modules/bootstrap/scss/placeholders"; | ||
| 96 | |||
| 97 | // 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss` | ||
| 98 | @import "../node_modules/bootstrap/scss/utilities/api"; | ||
| 99 | |||
| 100 | // 8. Add additional custom code here | ||
| 101 | @import "layout"; |