Skip to content

Commit 6a95502

Browse files
authored
Merge pull request #1244 from Patternslib/scss-fixes
fix: Fix SASS at-use import paths from node_modules.
2 parents 1ed7e9a + 07bc906 commit 6a95502

File tree

7 files changed

+21
-73
lines changed

7 files changed

+21
-73
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bundle-pre:
5959

6060
.PHONY: css
6161
css:
62-
@$(SASS) -I style -I _sass -I . _sass/_patterns.scss style/patterns.css
62+
@$(SASS) -I style --load-path node_modules/ _sass/_patterns.scss style/patterns.css
6363

6464

6565
# Update patterns-site

src/pat/colour-picker/_colour-picker.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@charset "UTF-8";
2-
3-
@use "../../../node_modules/spectrum-colorpicker/spectrum";
2+
@use "spectrum-colorpicker/spectrum";
43

54
.checkNative,
65
.checkPattern {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@charset "UTF-8";
2-
@use "../../../node_modules/pikaday/scss/pikaday.scss";
2+
@use "pikaday/scss/pikaday.scss";

src/pat/date-picker/documentation.md

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,36 @@ for browsers which don't yet support the HTML5 date input.
99

1010
### Examples
1111

12-
####Falling back to the browser's HTML5 picker if available.
12+
#### Falling back to the browser's HTML5 picker if available.
1313

1414
Set the `behavior` option to `native` to use the browser's HTML5 date input
1515
rendering when available.
1616

1717
<input class="pat-date-picker" type="date" data-pat-date-picker="behavior: native">
1818

19-
####Enforcing the styled non-HTML5 picker universally.
19+
#### Enforcing the styled non-HTML5 picker universally.
2020

2121
By default this pattern will NOT defer to the browser's HTML5 picker.
2222

2323
<input class="pat-date-picker" type="date">
2424

25-
####Default value
25+
#### Default value
2626

2727
<input class="pat-date-picker" type="date" value="2015-01-01">
2828

29-
####First day on Monday
29+
#### First day on Monday
3030

3131
<input class="pat-date-picker" type="date" value="2015-01-01" data-pat-date-picker="first-day: 1">
3232

33-
####Specifying the "min" and "max" attributes.
33+
#### Specifying the "min" and "max" attributes.
3434

3535
<input class="pat-date-picker" min="2015-01-01" max="2015-12-31" type="date">
3636

37-
####Show the week number.
37+
#### Show the week number.
3838

3939
<input class="pat-date-picker" data-pat-date-picker="week-numbers: show;" type="date">
4040

41-
####Multilingual support with German translations
41+
#### Multilingual support with German translations
4242

4343
The picker's UI can be translated by providing a URL to the `i18n` option. This
4444
URL must point to a JSON encoded resource containing the translations.
@@ -55,15 +55,15 @@ Here are all the i18n values in JSON format:
5555
"weekdaysShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
5656
}
5757

58-
####Automatically update one date when changing another
58+
#### Automatically update one date when changing another
5959

6060
You can define one date input to be after another date with the ``after`` option.
6161
The the other date is changed after the first, it will be automatically updated to be offset days after the first.
6262

6363
<input name="start" class="pat-date-picker" type="date"/>
6464
<input name="end" class="pat-date-picker" type="date" data-pat-date-picker="after: input[name=start]; offset-days: 2;"/>
6565

66-
####Format the displayed date
66+
#### Format the displayed date
6767

6868
In the default ``styled`` behavior mode, you can format the displayed date.
6969
The date input will be hidden and updated with an ISO8601 date to submit values which are machine-readable.
@@ -73,32 +73,6 @@ The locale option allows you to define the language in which the formatted date
7373
<input class="pat-date-picker" data-pat-date-picker="output-format: Do MMMM YYYY; locale: de" type="date" />
7474

7575

76-
### Why did we base this library on Pikaday?
77-
78-
When looking for the underlying library to use for this pattern, we compared
79-
pikaday and [pickadate](https://dbushell.github.io/Pikaday/).
80-
81-
- Prefixed CSS classes
82-
83-
Pikaday's CSS classes are prefixed to make them unique, whereas Pickadate's
84-
classes are very generic and therefore prone to clash with existing classes and CSS in certain sites.
85-
86-
- Better markup
87-
88-
One of the main drawbacks of pickadate is the markup that it produces.
89-
Pickaday's special markup is inserted relative to the input element being overridden.
90-
91-
In contrast, the markup generated by pikaday is appended to the end of the
92-
`<body>` tag, and it then uses absolute positioning to position the picker.
93-
94-
This is easier to style and less prone to create problems when integrating the
95-
picker in diverse styling environments.
96-
97-
- Simpler, more modest featureset and Javascript
98-
99-
Pikaday is only 5KB compressed. The code is AMD aware and easy to read and
100-
understand.
101-
10276
### Option reference
10377

10478
The HTML5 attributes `min` and `max` will be honoured.

src/pat/datetime-picker/documentation.md

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ for browsers which don't yet support the HTML5 date input.
99

1010
### Examples
1111

12-
####Enforcing the styled non-HTML5 picker universally.
12+
#### Enforcing the styled non-HTML5 picker universally.
1313

1414
By default this pattern will NOT defer to the browser's HTML5 picker.
1515

1616
<input class="pat-date-picker" type="date">
1717

18-
####Default value
18+
#### Default value
1919

2020
<input class="pat-date-picker" type="date" value="2015-01-01">
2121

22-
####Specifying the "min" and "max" attributes.
22+
#### Specifying the "min" and "max" attributes.
2323

2424
<input class="pat-date-picker" min="2015-01-01" max="2015-12-31" type="date">
2525

26-
####Show the week number.
26+
#### Show the week number.
2727

2828
<input class="pat-date-picker" data-pat-date-picker="week-numbers: show;" type="date">
2929

30-
####Multilingual support with German translations
30+
#### Multilingual support with German translations
3131

3232
The picker's UI can be translated by providing a URL to the `i18n` option. This
3333
URL must point to a JSON encoded resource containing the translations.
@@ -44,31 +44,6 @@ Here are all the i18n values in JSON format:
4444
"weekdaysShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
4545
}
4646

47-
### Why did we base this library on Pikaday?
48-
49-
When looking for the underlying library to use for this pattern, we compared
50-
pikaday and [pickadate](https://dbushell.github.io/Pikaday/).
51-
52-
- Prefixed CSS classes
53-
54-
Pikaday's CSS classes are prefixed to make them unique, whereas Pickadate's
55-
classes are very generic and therefore prone to clash with existing classes and CSS in certain sites.
56-
57-
- Better markup
58-
59-
One of the main drawbacks of pickadate is the markup that it produces.
60-
Pickaday's special markup is inserted relative to the input element being overridden.
61-
62-
In contrast, the markup generated by pikaday is appended to the end of the
63-
`<body>` tag, and it then uses absolute positioning to position the picker.
64-
65-
This is easier to style and less prone to create problems when integrating the
66-
picker in diverse styling environments.
67-
68-
- Simpler, more modest featureset and Javascript
69-
70-
Pikaday is only 5KB compressed. The code is AMD aware and easy to read and
71-
understand.
7247

7348
### Option reference
7449

src/pat/tooltip/_tooltip.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@charset "UTF-8";
2-
@use "../../../node_modules/tippy.js/dist/tippy";
2+
@use "tippy.js/dist/tippy";

style/patterns.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)