Sitelet https://github.com/purescript-halogen/purescript-halogen-css/pull/15
Skip to content

update 1.0.0 - #15

Merged
cryogenian merged 1 commit into
purescript-halogen:masterfrom
cryogenian:halogen-1.0.0
Feb 7, 2017
Merged

cryogenian merged 1 commit into
purescript-halogen:masterfrom
cryogenian:halogen-1.0.0

Conversation

@cryogenian

Copy link
Copy Markdown
Contributor

No description provided.

@cryogenian
cryogenian force-pushed the halogen-1.0.0 branch 2 times, most recently from c9e8c4a to ebb3095 Compare February 6, 2017 21:51
@cryogenian
cryogenian requested a review from garyb February 6, 2017 23:14
@cryogenian

Copy link
Copy Markdown
Contributor Author

@garyb please review

Comment thread src/Halogen/HTML/CSS.purs

-- | Render a set of rules as a `style` element.
stylesheet ∷ ∀ p i. CSS → HTML p i
stylesheet ∷ ∀ p i. CSS → HC.HTML p i

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use HTMLstyle from DOM.HTML.Indexed for the p here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was my initial intention. But Node and Leaf from Halogen.HTML.Elements are functions from Array (IProp _) now and this thing doesn't use any props

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good point!

Comment thread src/Halogen/HTML/CSS.purs
style ∷ ∀ i r. CSS → HP.IProp (style ∷ String|r) i
style =
prop (propName "style") (Just $ attrName "style")
HP.prop (HC.PropName "style")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting up a new prop and creating a IsProp instance for Styles I think we may as well reuse HP.style and compose in a function to print the CSS as a string. We can get rid of the Styles newtype then too, which was only there for the IsProp machinery.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cryogenian

Copy link
Copy Markdown
Contributor Author
  • Removed Styles newtype

@garyb garyb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 assuming Travis passes again!

@cryogenian
cryogenian merged commit 54ba987 into purescript-halogen:master Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants