Skip to content

Commit 68a5307

Browse files
authored
Merge pull request #83 from jackdomleo7/81-newline
2 parents 62d8538 + 1da9181 commit 68a5307

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

cooltipz.css

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

cooltipz.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_sizes.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,13 @@
4848
}
4949
}
5050
}
51+
52+
@mixin size-custom {
53+
&[data-cooltipz-size="custom"],
54+
&.cooltipz--custom {
55+
&::after {
56+
white-space: pre;
57+
word-wrap: break-word;
58+
}
59+
}
60+
}

src/cooltipz.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
@include size-small;
3333
@include size-medium;
3434
@include size-large;
35+
@include size-custom;
3536

3637
&[data-cooltipz-static],
3738
&.cooltipz--static {

test.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,13 @@ <h3>Sizes</h3>
150150
<button data-cooltipz-dir="top" data-cooltipz-size="small" aria-label="Hello there! How are you?">data: small</button>
151151
<button data-cooltipz-dir="top" data-cooltipz-size="medium" aria-label="Hello there! How are you? How's your day going?">data: medium</button>
152152
<button data-cooltipz-dir="top" data-cooltipz-size="large" aria-label="Hello there! How are you? How's your day going? What's your favourite colour?">data: large</button>
153+
<button data-cooltipz-dir="top" data-cooltipz-size="custom" aria-label="Hello there!&#xa;How are you?&#xa;How's your day going?&#xa;What's your favourite colour?">data: custom</button>
153154
<br/>
154-
<button class="cooltipz--bottom" data-cooltipz-size="fit" aria-label="Hello there!">class: fit</button>
155-
<button class="cooltipz--bottom" data-cooltipz-size="small" aria-label="Hello there! How are you?">class: small</button>
156-
<button class="cooltipz--bottom" data-cooltipz-size="medium" aria-label="Hello there! How are you? How's your day going?">class: medium</button>
157-
<button class="cooltipz--bottom" data-cooltipz-size="large" aria-label="Hello there! How are you? How's your day going? What's your favourite colour?">class: medium</button>
155+
<button class="cooltipz--bottom cooltipz--fit" aria-label="Hello there!">class: fit</button>
156+
<button class="cooltipz--bottom cooltipz--small" aria-label="Hello there! How are you?">class: small</button>
157+
<button class="cooltipz--bottom cooltipz--medium" aria-label="Hello there! How are you? How's your day going?">class: medium</button>
158+
<button class="cooltipz--bottom cooltipz--large" aria-label="Hello there! How are you? How's your day going? What's your favourite colour?">class: medium</button>
159+
<button class="cooltipz--bottom cooltipz--custom" aria-label="Hello there!&#xa;How are you?&#xa;How's your day going?&#xa;What's your favourite colour?">class: custom</button>
158160
</section>
159161
<hr/>
160162
<section>

0 commit comments

Comments
 (0)