Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 1cb196f

Browse files
committed
fix(merge): resolve merge conflicts
2 parents a510303 + cc01d0c commit 1cb196f

24 files changed

+876
-324
lines changed
Binary file not shown.

examples/bootstrap/css-gridish/scss/_core.scss

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "functions.scss";
22
@import "mixins.scss";
33
@import "variables.scss";
4+
@import "utilities.scss";
45

56
html {
67
font-size: map-get($grid-values, "rem") * 1px;
@@ -90,23 +91,29 @@ body {
9091
}
9192

9293
@each $name, $breakpoint in $allBreakpoints {
93-
@include gridBreakpointWrapper($breakpoint, $first) {
94+
@include grid-breakpoint-wrapper($breakpoint, $first) {
9495
@if $includeFlexFallback {
95-
@if isSameBreakpoint($breakpoint, $last) == false {
96-
@include gridLegacyHeights($name, $rows, $rowHeight);
96+
@if is-same-breakpoint($breakpoint, $last) == false {
97+
@include grid-legacy-heights($name, $rows, $rowHeight);
9798
}
9899
}
99100

100-
@include gridLegacyZeros($breakpoint, $allBreakpoints, $name);
101-
@include gridLegacyColumns($breakpoint, $first, $last, $name, $allBreakpoints);
102-
@include gridMargin($breakpoint, $last);
103-
@include gridPadding($breakpoint);
104-
@include gridLegacyWrapper($includeFlexFallback) {
105-
@include gridColumns($breakpoint, $first, $last) {
101+
@include grid-legacy-zeros($breakpoint, $allBreakpoints, $name);
102+
@include grid-legacy-columns(
103+
$breakpoint,
104+
$first,
105+
$last,
106+
$name,
107+
$allBreakpoints
108+
);
109+
@include grid-margin($breakpoint, $last);
110+
@include grid-padding($breakpoint);
111+
@include grid-legacy-wrapper($includeFlexFallback) {
112+
@include grid-columns($breakpoint, $first, $last) {
106113
display: grid;
107114
grid-auto-rows: minmax($rowHeight * 1rem, min-content);
108115
}
109-
@include gridVariables($breakpoint, $first, $rows, $rowHeight);
116+
@include grid-variables($breakpoint, $first, $rows, $rowHeight);
110117
}
111118
}
112119
}

examples/bootstrap/css-gridish/scss/_functions.scss

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
@import "sass-list-maps";
22

33
// Transform the gutter property into a padding property for web
4-
@function addPadding($breakpoints) {
4+
@function add-padding($breakpoints) {
55
$cleanBreakpoints: ();
66
@each $name, $breakpoint in $breakpoints {
77
$cleanBreakpoints: map-merge(
88
$cleanBreakpoints,
9-
109
(
11-
$name: map-merge($breakpoint, (padding: calc(#{map-get(
12-
$breakpoint,
13-
gutter
14-
)} / 2)))
10+
$name:
11+
map-merge(
12+
$breakpoint,
13+
(padding: calc(#{map-get($breakpoint, gutter)} / 2))
14+
)
1515
)
1616
);
1717
}
@@ -20,7 +20,7 @@
2020
}
2121

2222
// Merge standard and custom breakpoints into list
23-
@function allBreakpoints($breakpoints, $extraBreakpoints, $first, $last) {
23+
@function all-breakpoints($breakpoints, $extraBreakpoints, $first, $last) {
2424
$allBreakpoints: $breakpoints;
2525
@each $currentBreakpoint in $extraBreakpoints {
2626
$extraBreakpointName: nth($currentBreakpoint, 1);
@@ -29,7 +29,9 @@
2929
$match: null;
3030
@each $majorBreakpoint in $breakpoints {
3131
@if $found == false {
32-
@if map-get(nth($majorBreakpoint, 2), breakpoint) > $extraBreakpointWidth {
32+
@if map-get(nth($majorBreakpoint, 2), breakpoint) >
33+
$extraBreakpointWidth
34+
{
3335
$found: true;
3436
} @else {
3537
$match: $majorBreakpoint;
@@ -51,58 +53,60 @@
5153

5254
$newBreakpoint: map-merge(
5355
nth($match, 2),
54-
(breakpoint: $extraBreakpointWidth)
56+
(breakpoint: $extraBreakpointWidth)
5557
);
5658
$currentBreakpoint: (
57-
$extraBreakpointName: map-merge(nth($match, 2), (breakpoint: $extraBreakpointWidth))
59+
$extraBreakpointName:
60+
map-merge(nth($match, 2), (breakpoint: $extraBreakpointWidth))
5861
);
5962
$allBreakpoints: map-merge($allBreakpoints, $currentBreakpoint);
6063
}
6164

6265
@return maps-sort($allBreakpoints, breakpoint);
6366
}
6467

65-
@function columnStringWidth($string, $multiple) {
68+
@function column-string-width($string, $multiple) {
6669
@return 1rem;
6770
}
6871

69-
@function columnWidth($breakpoint, $first, $last, $i, $columnAmount) {
72+
@function column-width($breakpoint, $first, $last, $i, $columnAmount) {
7073
$columnSize: 100 / map-get($breakpoint, columns) * $i *
7174
map-get($breakpoint, columns) / $columnAmount;
7275
$margin: 0;
7376
$type: "vw";
7477
@if map-get($breakpoint, margin) {
7578
$margin: map-get($breakpoint, margin) * 2;
7679
}
77-
@if (map-get($breakpoint, margin) != null and
78-
map-get($breakpoint, margin) != 0) {
80+
@if (
81+
map-get($breakpoint, margin) != null and map-get($breakpoint, margin) != 0
82+
) {
7983
$columnSize: calc(
80-
(#{100vw} - #{$margin}) * #{roundDecimal($i / $columnAmount, 3, floor)}
84+
(#{100vw} - #{$margin}) * #{round-decimal($i / $columnAmount, 3, floor)}
8185
);
8286
$type: "";
8387
}
8488

8589
@return #{$columnSize}#{$type};
8690
}
8791

88-
@function isSameBreakpoint($a, $b) {
92+
@function is-same-breakpoint($a, $b) {
8993
@return map-get($a, breakpoint) == map-get($b, breakpoint);
9094
}
9195

9296
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
93-
@function roundDecimal ($number, $digits: 0, $mode: round) {
97+
@function round-decimal($number, $digits: 0, $mode: round) {
9498
$n: 1;
9599
// $number must be a number
96100
@if type-of($number) != number {
97-
@warn '#{ $number } is not a number.';
101+
@warn "#{ $number } is not a number.";
98102
@return $number;
99103
}
100104
// $digits must be a unitless number
101105
@if type-of($digits) != number {
102-
@warn '#{ $digits } is not a number.';
106+
@warn "#{ $digits } is not a number.";
103107
@return $number;
104108
} @else if not unitless($digits) {
105-
@warn '#{ $digits } has a unit.';
109+
@warn "#{ $digits } has a unit.";
106110
@return $number;
107111
}
108112
@for $i from 1 through $digits {
@@ -115,14 +119,14 @@ map-get($breakpoint, margin) != 0) {
115119
} @else if $mode == floor {
116120
@return floor($number * $n) / $n;
117121
} @else {
118-
@warn '#{ $mode } is undefined keyword.';
122+
@warn "#{ $mode } is undefined keyword.";
119123
@return $number;
120124
}
121125
}
122126

123127
/// String to number converter
124128
/// @author Hugo Giraudel
125-
@function stringToNumber($value) {
129+
@function string-to-number($value) {
126130
@if type-of($value) == "number" {
127131
@return $value;
128132
} @else if type-of($value) != "string" {
@@ -148,7 +152,7 @@ map-get($breakpoint, margin) != 0) {
148152
@for $i from if($minus, 2, 1) through str-length($value) {
149153
$character: str-slice($value, $i, $i);
150154

151-
@if not (index(map-keys($numbers), $character) or $character == ".") {
155+
@if not(index(map-keys($numbers), $character) or $character == ".") {
152156
@return to-length(if($minus, -$result, $result), str-slice($value, $i));
153157
}
154158

@@ -164,3 +168,15 @@ map-get($breakpoint, margin) != 0) {
164168

165169
@return if($minus, -$result, $result);
166170
}
171+
172+
/// Traverse maps and retrieve deeply nested values: https://css-tricks.com/snippets/sass/deep-getset-maps/
173+
/// @author Hugo Giraudel
174+
/// @param {Map} $map A sass map and any number of keys.
175+
/// @param {*} $keys Nested values.
176+
/// @return Nested values or nested map.
177+
@function map-deep-get($map, $keys...) {
178+
@each $key in $keys {
179+
$map: map-get($map, $key);
180+
}
181+
@return $map;
182+
}

0 commit comments

Comments
 (0)