Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs clarification #406

Merged
merged 22 commits into from
Jan 18, 2024
Merged

Docs clarification #406

merged 22 commits into from
Jan 18, 2024

Conversation

psb
Copy link
Contributor

@psb psb commented Jan 17, 2024

Minor updates to the docs to fix spelling errors and to add some clarifications. Still some questions:

  1. I'm not sure what you are trying to say with this line. I have tried to rephrase it as:
  • Only single properties are allowed; declarations are not allowed. Declarations can contain selectors, but rules can only contain a single pairing of property and value. If you need a selector or more than one rule, use %cx{:rescript} instead.

But I'm not sure if this makes sense as I don't really understand the original line.

  1. Is there a missing link on this line? [Css bindings] is in square brackets but I don't know why.

Copy link

vercel bot commented Jan 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
styled-ppx ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 7:06pm

@davesnx
Copy link
Owner

davesnx commented Jan 18, 2024

  1. I'm not sure what you are trying to say with this line. I have tried to rephrase it as:
  • Only single properties are allowed; declarations are not allowed. Declarations can contain selectors, but rules can only contain a single pairing of property and value. If you need a selector or more than one rule, use %cx{:rescript} instead.

%css() only works on properties (color: blue) and doesn't work with anything else: :hover { color: blue} or color: blue; background-color: red. It's just one property.

Now reading the text I agree it doesn't give that impression, but unsure how to make it more clear.

  1. Is there a missing link on this line? [Css bindings] is in square brackets but I don't know why.

It's a link that should point to the Css bindings API that ships with styled-ppx, but I haven't had the time to publish the docs for it (I should use odoc for it and somehow make it available under the next site). I would either remove the link or point to ocaml.org when I publish styled-ppx to opam

@davesnx davesnx marked this pull request as ready for review January 18, 2024 08:42
@psb
Copy link
Contributor Author

psb commented Jan 18, 2024

  1. I'm not sure what you are trying to say with this line. I have tried to rephrase it as:
  • Only single properties are allowed; declarations are not allowed. Declarations can contain selectors, but rules can only contain a single pairing of property and value. If you need a selector or more than one rule, use %cx{:rescript} instead.

%css() only works on properties (color: blue) and doesn't work with anything else: :hover { color: blue} or color: blue; background-color: red. It's just one property.

Now reading the text I agree it doesn't give that impression, but unsure how to make it more clear.

I think adding the examples you have written help. So we could change it to something like:

Only single properties are allowed, e.g., color: blue, and multiple declarations, e.g., :hover { color: blue} or color: blue; background-color: red, are not allowed. If you need to use a selector or use more than one rule, use %cx{:rescript} instead.

  1. Is there a missing link on this line? [Css bindings] is in square brackets but I don't know why.

It's a link that should point to the Css bindings API that ships with styled-ppx, but I haven't had the time to publish the docs for it (I should use odoc for it and somehow make it available under the next site). I would either remove the link or point to ocaml.org when I publish styled-ppx to opam

I'll remove the missing link for now.

@davesnx
Copy link
Owner

davesnx commented Jan 18, 2024

Only single properties are allowed, e.g., color: blue, and multiple declarations, e.g., :hover { color: blue} or color: blue; background-color: red, are not allowed. If you need to use a selector or use more than one rule, use %cx{:rescript} instead.

That makes sense

@davesnx davesnx merged commit c81c90f into davesnx:main Jan 18, 2024
1 check passed
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