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

How does parcel implement the unitless style value of Vue templates? #4198

Open
wspl opened this issue Feb 21, 2020 · 1 comment
Open

How does parcel implement the unitless style value of Vue templates? #4198

wspl opened this issue Feb 21, 2020 · 1 comment
Labels

Comments

@wspl
Copy link

@wspl wspl commented Feb 21, 2020

Question

I found that on webpack-based vue projects, the size value in the : style attribute needs to end with px. But it is not needed in parcel-based project. So I want to ask if this is the design of parcel, or does vue-template-compiler support unitless size?

🔦 Context

<div :style="{height: 100}">
@cdll

This comment has been minimized.

Copy link

@cdll cdll commented Feb 21, 2020

i think it is an auto-transform logic of Number to String(with px) in js library as i known it is supported by Avalonjs at dynamic style binding directive; though i 'm now using rem unit system with Vuejs.

--- update ---

oh i 've tested that it really make effect with

<i class=''
  style={{
    fontSize: '123px'
  }}
/>

but not working with

<i class=''
  style={{
    fontSize: 123
  }}
/>

on vue-cli bundler(based on webpack)...

but i dont think that Parcel will do some unitless auto-transform for common js libraries~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.