Skip to content

Commit 0714de1

Browse files
author
Richard Feldman
committed
Fix obsolete stylesheet mentions in docs.
1 parent 74e5345 commit 0714de1

File tree

4 files changed

+48
-71
lines changed

4 files changed

+48
-71
lines changed

src/Css.elm

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2789,16 +2789,11 @@ lengthConverter units unitLabel numericValue =
27892789

27902790
{-| Convenience length value that compiles to 0 with no units.
27912791
2792-
stylesheet
2793-
[ ul
2794-
[ padding zero ]
2795-
]
2792+
css [ padding zero ]
27962793
27972794
...compiles to:
27982795
2799-
ul {
2800-
padding: 0;
2801-
}
2796+
padding: 0;
28022797
28032798
-}
28042799
zero :
@@ -7897,23 +7892,19 @@ animationNames identifiers =
78977892
[ textDecoration underline ]
78987893
]
78997894
7900-
stylesheet
7901-
[ class FancyLink
7902-
[ color (rgb 128 64 32)
7903-
, underlineOnHover
7904-
]
7905-
]
7895+
css
7896+
[ color (rgb 128 64 32)
7897+
, underlineOnHover
7898+
]
79067899
79077900
...has the same result as:
79087901
7909-
stylesheet
7910-
[ class FancyLink
7911-
[ color (rgb 128 64 32)
7912-
, textDecoration none
7913-
, hover
7902+
css
7903+
[ color (rgb 128 64 32)
7904+
, textDecoration none
7905+
, hover
79147906
[ textDecoration underline ]
7915-
]
7916-
]
7907+
]
79177908
79187909
-}
79197910
batch : List Style -> Style
@@ -7923,16 +7914,11 @@ batch =
79237914

79247915
{-| Define a custom property.
79257916
7926-
stylesheet
7927-
[ body
7928-
[ property "-webkit-font-smoothing" "none" ]
7929-
]
7917+
css [ property "-webkit-font-smoothing" "none" ]
79307918
79317919
...outputs
79327920
7933-
body {
7934-
-webkit-font-smoothing: none;
7935-
}
7921+
-webkit-font-smoothing: none;
79367922
79377923
-}
79387924
property : String -> String -> Style
@@ -7972,16 +7958,19 @@ This can be useful for deprecated pseudo-classes such as `-moz-any-link`, which
79727958
[has been deprecated and removed](https://www.fxsitecompat.com/en-CA/docs/2016/any-link-css-pseudo-class-has-been-unprefixed/)
79737959
in modern browsers.
79747960
7975-
stylesheet
7976-
[ body
7977-
[ pseudoClass "-moz-any-link" [ color (hex "f00") ] ]
7978-
]
7961+
button
7962+
[ css [ pseudoClass "-moz-any-link" [ color (hex "f00") ] ] ]
7963+
[ text "Whee!" ]
79797964
79807965
...outputs
79817966
7982-
body:-moz-any-link {
7983-
color: #f00;
7984-
}
7967+
<button class="f9fcb2">Whee!</button>
7968+
7969+
<style>
7970+
.f9fcb2:-moz-any-link {
7971+
color: #f00;
7972+
}
7973+
</style>
79857974
79867975
-}
79877976
pseudoClass : String -> List Style -> Style
@@ -8267,16 +8256,19 @@ valid =
82678256

82688257
{-| Define a custom pseudo-element.
82698258
8270-
stylesheet
8271-
[ body
8272-
[ pseudoElement "-webkit-scrollbar" [ display none ] ]
8273-
]
8259+
textarea
8260+
[ css [ pseudoElement "-webkit-scrollbar" [ display none ] ] ]
8261+
[]
82748262
82758263
...outputs
82768264
8277-
body::-webkit-scrollbar {
8278-
display: none;
8279-
}
8265+
<textarea class="d84ff7"></textarea>
8266+
8267+
<style>
8268+
.d84ff7::-webkit-scrollbar {
8269+
display: none;
8270+
}
8271+
</style>
82808272
82818273
-}
82828274
pseudoElement : String -> List Style -> Style
@@ -8340,10 +8332,7 @@ CSS specification, and as such are intentionally unsupported.
83408332
Using them is a bad idea, but if the fate of the world depends on it, you can
83418333
fall back on something like this:
83428334
8343-
stylesheet
8344-
[ button
8345-
[ property "border-left" "thin" ]
8346-
]
8335+
css [ property "border-left" "thin" ]
83478336
83488337
-}
83498338
thin : IntentionallyUnsupportedPleaseSeeDocs
@@ -8359,10 +8348,7 @@ CSS specification, and as such are intentionally unsupported.
83598348
Using them is a bad idea, but if the fate of the world depends on it, you can
83608349
fall back on something like this:
83618350
8362-
stylesheet
8363-
[ button
8364-
[ property "border-left" "thick" ]
8365-
]
8351+
css [ property "border-left" "thick" ]
83668352
83678353
-}
83688354
thick : IntentionallyUnsupportedPleaseSeeDocs

src/Css/Colors.elm

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@ module Css.Colors exposing (aqua, black, blue, fuchsia, gray, green, lime, maroo
22

33
{-| A nicer default set of colors than the ones CSS ships with. Color codes taken from [clrs.cc](http://clrs.cc).
44
5-
import Css.Colors exposing (..)
6-
7-
stylesheet
8-
[ button
9-
[ backgroundColor blue ]
10-
]
5+
css [ backgroundColor blue ]
116
127
...compiles to:
138
14-
button {
15-
backgroundColor: #0074D9;
16-
}
9+
backgroundColor: #0074D9;
1710
1811
1912
# Colors

src/Css/Foreign.elm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ type alias Snippet =
190190

191191
{-| An [id selector](https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors).
192192
193-
stylesheet
193+
global
194194
[ id NavBar
195195
[ width 960 px
196196
, backgroundColor (rgb 123 42 208)
@@ -207,7 +207,7 @@ id identifier styles =
207207

208208
{-| A [class selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors).
209209
210-
stylesheet
210+
global
211211
[ class LoginFormButton
212212
[ fontWeight normal
213213
, color (rgb 128 64 32)
@@ -226,7 +226,7 @@ class class styles =
226226
[attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors)
227227
and [universal selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors).
228228
229-
stylesheet "homepage"
229+
global
230230
[ selector "* [lang^=en]"
231231
[ textDecoration underline
232232
, color (rgb 7 7 7)
@@ -267,7 +267,7 @@ everything styles =
267267

268268
{-| Combines media queries into a `@media` rule.
269269
270-
(stylesheet << namespace "homepage")
270+
global
271271
[ media [ only screen [ Media.minWidth (px 300) ] ]
272272
[ footer [ Css.maxWidth (px 300) ] ]
273273
]
@@ -404,9 +404,9 @@ each snippetCreators styles =
404404

405405
{-| Define a custom element.
406406
407-
stylesheet
408-
[ typeSelector "aside" [ display block ]
409-
]
407+
global
408+
[ typeSelector "aside" [ display block ]
409+
]
410410
411411
...outputs
412412

src/Css/Media.elm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,17 +209,15 @@ type alias Value compatible =
209209

210210
{-| Combines media queries that are nested under selectors into a `@media` rule.
211211
212-
(stylesheet << namespace "homepage")
213-
[ footer
214-
[ withMedia [ only screen [ Media.minWidth (px 300), Media.maxWidth (px 800) ] ]
215-
[ Css.maxWidth (px 300) ]
216-
]
212+
css
213+
[ withMedia [ only screen [ Media.minWidth (px 300), Media.maxWidth (px 800) ] ]
214+
[ Css.maxWidth (px 300) ]
217215
218216
The above code translates into the following CSS.
219217
220218
```css
221219
@media only screen and (min-width: 300px) and (max-width: 800px) {
222-
footer {
220+
._c9f0fd {
223221
max-width: 300px;
224222
}
225223
}

0 commit comments

Comments
 (0)