(and Sass)
Ask Questions!
Syntactically Awesome StyleSheets
$bg-color: #ffa;
$main-button-color: red;
$mobile-break: 768px;
$tablet-break: 1024px;
.my-app {
background-color: $bg-color;
padding: 10px 50px;
@media screen and (max-width: $mobile-break) {
padding: 5px 5px;
}
header, footer {
button, a.button {
background-color: $main-button-color;
text-color: white;
&:hover {
background-color: darken($main-button-color, 20%);
}
// On phones, make text side larger:
@media screen and (max-width: $mobile-break) {
font-size: 1.5em;
}
}
}
}
.my-app {
background-color: #ffa;
padding: 10px 50px;
}
@media screen and (max-width: 768px) {
.my-app {
padding: 5px 5px;
}
}
.my-app header button, .my-app header a.button, .my-app footer button, .my-app footer a.button {
background-color: red;
text-color: white;
}
.my-app header button:hover, .my-app header a.button:hover, .my-app footer button:hover, .my-app footer a.button:hover {
background-color: #990000;
}
@media screen and (max-width: 768px) {
.my-app header button, .my-app header a.button, .my-app footer button, .my-app footer a.button {
font-size: 1.5em;
}
}
SCSS
CSS
A delightful language for reliable webapps.
Generate JavaScript with great performance and no runtime exceptions.
Intentionally left blank
import Browser
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
main =
Browser.sandbox
{ init = { count = 0 }
, update = update
, view = view
}
type Msg = Increment | Decrement
update msg model =
case msg of
Increment ->
{ model | count = count + 1 }
Decrement ->
{ model | count = count - 1 }
view model =
div []
[ button [ onClick Decrement ] [ text "-" ]
, div [] [ text (String.fromInt model.count) ]
, button [ onClick Increment ] [ text "+" ]
]
Shoutout to George Argyrousis!
{
"name": "Qqwy / Wiebe-Marten",
"avatar_url": "https://avatars2.githubusercontent.com/u/5345745?v=4",
"html_url": "https://github.com/Qqwy",
"public_repos": 116,
.... // More fields
}
api.github.com/users/:username
API endpoint: