Skip to content

Commit 7832d1a

Browse files
committed
removing text-decoration cause CSS sucks.
1 parent 5e98b65 commit 7832d1a

File tree

4 files changed

+15
-34
lines changed

4 files changed

+15
-34
lines changed

example/src/Main.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ s2 = slide "Primitives" $
3030
, text "title: a title"
3131
, text "link: turn an element into a clickable link"
3232
, text "center: center an element"
33+
, text "bold/italic:"
34+
<+> bold (text "bold")
35+
<+> text "and"
36+
<+> italic (text "italic")
37+
, text "withClass/withId: add a class or id to element"
3338
]
3439
]
3540

example/style.css

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,8 @@ a:hover {
9797

9898

9999
.boldEl {
100-
font-weight: bold;
100+
font-weight: bold !important;
101101
}
102-
.italicsEl {
103-
font-style: italic;
102+
.italicEl {
103+
font-style: italic !important;
104104
}
105-
.underlineEl {
106-
text-decoration: underline;
107-
}
108-
.linethroughEl {
109-
text-decoration: line-through;
110-
}
111-

src/Slides.purs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ module Slides
2424
, withClass
2525
, withId
2626
, bold
27-
, italics
28-
, underline
29-
, linethrough
27+
, italic
3028
) where
3129

3230
import Prelude
@@ -239,17 +237,9 @@ center = withClass "center" <<< group <<< singleton
239237
bold :: Element -> Element
240238
bold = withClass "boldEl" <<< group <<< singleton
241239

242-
-- | Format text with italics in this element
243-
italics :: Element -> Element
244-
italics = withClass "italicsEl" <<< group <<< singleton
245-
246-
-- | Format text with underline in this element
247-
underline :: Element -> Element
248-
underline = withClass "underlineEl" <<< group <<< singleton
249-
250-
-- | Format text with linethrough in this element
251-
linethrough :: Element -> Element
252-
linethrough = withClass "linethroughEl" <<< group <<< singleton
240+
-- | Format text with italic in this element
241+
italic :: Element -> Element
242+
italic = withClass "italicEl" <<< group <<< singleton
253243

254244

255245
---------------

style.css

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,8 @@ a:hover {
9797

9898

9999
.boldEl {
100-
font-weight: bold;
100+
font-weight: bold !important;
101101
}
102-
.italicsEl {
103-
font-style: italic;
102+
.italicEl {
103+
font-style: italic !important;
104104
}
105-
.underlineEl {
106-
text-decoration: underline;
107-
}
108-
.linethroughEl {
109-
text-decoration: line-through;
110-
}
111-

0 commit comments

Comments
 (0)