Skip to content

Commit bb902d9

Browse files
committed
Revert removal of text balancer
1 parent 8cec6c4 commit bb902d9

3 files changed

Lines changed: 24 additions & 6 deletions

File tree

website/content/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title = "Free online vector editor & procedural design tool"
33
template = "section.html"
44

55
[extra]
6-
css = ["/page/index.css", "/component/carousel.css", "/component/feature-icons.css", "/component/feature-box.css", "/component/youtube-embed.css"]
6+
css = ["/page/index.css", "/component/carousel.css", "/component/feature-icons.css", "/component/feature-box.css", "/component/youtube-embed.css", "/layout/balance-text.css"]
77
js = ["/js/carousel.js", "/js/youtube-embed.js", "/js/video-autoplay.js"]
8-
linked_js = []
8+
linked_js = ["https://static.graphite.rs/text-balancer/text-balancer.js"]
99
meta_description = "Open source free software. A vector graphics creativity suite with a clean, intuitive interface. Opens instantly (no signup) and runs locally in a browser. Exports SVG, PNG, JPG."
1010
+++
1111

website/sass/base.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,6 @@ article {
407407
min-height: 0;
408408
}
409409

410-
.balance-text {
411-
text-wrap: balance;
412-
}
413-
414410
// ==================================
415411
// HEADER AND TEXT ELEMENT TAG STYLES
416412
// ==================================
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// CSS component of the JS text balancer script.
2+
// This must be loaded as an inline stylesheet in the head of the
3+
// document to avoid the possibility of a visible layout shift.
4+
5+
.balance-text {
6+
visibility: hidden;
7+
}
8+
9+
@media (scripting: none) {
10+
.balance-text {
11+
visibility: visible !important;
12+
}
13+
}
14+
15+
@supports (text-wrap: balance) {
16+
.balance-text,
17+
.balanced-text {
18+
text-align: left;
19+
text-wrap: balance;
20+
visibility: visible;
21+
}
22+
}

0 commit comments

Comments
 (0)