-
Notifications
You must be signed in to change notification settings - Fork 780
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
V2 css enhance #805
V2 css enhance #805
Conversation
…e(null) Object literals (e.g. { a: 3 }) automatically inherit from Object. This means that the object created by object literals will have methods defined in the Object.prototype like hasOwnProperty, toString, etc. We could make our virtual DOM a little bit "purer" by using Object.create(null). This will create a truly plain object that doesn't inherit from Object but null instead.
just for [jorgebucaran#801](jorgebucaran#801)! Replace the Object.assign method with a lightweight polyfill. Of course, this PR is still pending, and the core is still about side effects.
Codecov Report
@@ Coverage Diff @@
## V2 #805 +/- ##
==========================================
- Coverage 31.53% 31.14% -0.39%
==========================================
Files 1 1
Lines 241 244 +3
Branches 73 74 +1
==========================================
Hits 76 76
- Misses 111 113 +2
- Partials 54 55 +1
Continue to review full report at Codecov.
|
Using important is usually a last resort.. is using important on inline styles ever advised? Or are you just going for complete/closeness to the spec? |
Is this necessary? Inline styles always take precedence unless a css style was already marked as @cbbfcd Are you running into an issue where you can't use css and must flag the inline style as important? Another thing to consider is that react has not put any stance on using !important either. |
Have you tried to use <div style={{ cssText: 'color:orange !important' }} /> Your approach will not work with styles in lowerCamelCase like this one: <div style={{ fontSize: '32px !important' }} /> |
Sorry, I did some research. My idea is indeed wrong. Thank you for your correction. |
yep, My idea is indeed wrong. thank u very much. |
My idea is indeed wrong. thank u very much |
@cbbfcd Could you merge or remove your duplicate comments? Thanks. |
just like this:
according to this 👉setProperty
and i have a test:
So I think there should be a test about importance here.