vuejs / vuejs/docs

Document SFC CSS v-bind types behavior

Open
#1,842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Vue
Stars
3.2k
Forks
5k
Avg merge
14d 17h
Merged PRs (30d)
1

Description

What problem does this feature solve?

SFC CSS support a v-bind function for passing data from the components to its associated CSS. But the behavior in regards to CSS types is not documented. https://vuejs.org/api/sfc-css-features.html#v-bind-in-css

CSS uses various types apart from just plain numbers and string literals, such as units (px, em, rem, etc), which are not obvious how to correctly use with v-bind. I believe this should be documented and explained how to handle correctly in the official docs.

What does the proposed API look like?

Updated documentation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the v-bind-in-CSS section at https://vuejs.org/api/sfc-css-features.html#v-bind-in-css and review how CSS types such as units are handled. Update the official documentation to explain correct v-bind usage for these types, with examples that make the expected behavior clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.