-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add support for visibility property. Resolves #146. * Remove redundant import.
- Loading branch information
Showing
4 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module CSS.DisplaySpec where | ||
|
||
import Prelude | ||
|
||
import CSS.Color (green) | ||
import CSS.Color as Color | ||
import CSS.Common (hidden, inherit, initial, unset, visible) | ||
import CSS.Display (collapse, visibility) | ||
import CSS.Size (em, px) | ||
import Common (shouldRenderFrom) | ||
import Data.Maybe (fromJust) | ||
import Data.Traversable (traverse_) | ||
import Data.Tuple.Nested ((/\)) | ||
import Partial.Unsafe (unsafePartial) | ||
import Test.Spec (Spec, describe) | ||
|
||
spec :: Spec Unit | ||
spec = do | ||
|
||
describe "visibility (Mozilla examples)" do | ||
let testVisibility (s /\ v) = ("visibility: " <> s) `shouldRenderFrom` visibility v | ||
describe "Keyword values" $ | ||
traverse_ | ||
testVisibility | ||
[ "visible" /\ visible | ||
, "hidden" /\ hidden | ||
, "collapse" /\ collapse | ||
] | ||
describe "Global values" $ | ||
traverse_ | ||
testVisibility | ||
[ "inherit" /\ inherit | ||
, "initial" /\ initial | ||
, "unset" /\ unset | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters