-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
fix: webkit properties not being recognized #112
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
- Coverage 37.39% 37.07% -0.32%
==========================================
Files 87 87
Lines 1182 1176 -6
Branches 227 225 -2
==========================================
- Hits 442 436 -6
Misses 633 633
Partials 107 107
Continue to review full report at Codecov.
|
@eps1lon is this a regression we missed in the last PR that ended up being 2.2.0 - or new functionality? |
|
||
.map(propertyFile => camelToDashed(propertyFile.replace('.js', ''))) | ||
.map(property => { | ||
const isVendorSpecific = /^(o|moz|ms|webkit)-/.test(property); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sneaking in support for other vendor prefixes. I'm not sure if you're opinionated about other vendor prefixes. I'm looking at this purely from a testing perspective where I'd like to see support for all vendor prefixes. Otherwise it's hard to write tests that cover all browsers at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried the tests in 2.1.0 ( |
Only webkit properties are in the spec; other engine prefixes should not be added. |
This statement clashes with cssstyle/lib/allExtraProperties.js Lines 4 to 5 in ebd2dab
|
The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
@jsakas Is there anything I can do to get this merged? |
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
This reverts commit cf00812. The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
Sure thing.
Personally I would prefer if this also handled other prefixed properties. This is in line with cssstyle/lib/allExtraProperties.js Lines 4 to 5 in ebd2dab
But I understand if you want to change that stance to "we only support properties in the spec". |
|
||
.map(propertyFile => camelToDashed(propertyFile.replace('.js', ''))) | ||
.map(property => { | ||
const isVendorSpecific = /^(o|moz|ms|webkit)-/.test(property); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @eps1lon, do you intend to fix conflict for this pull request? What I also noticed is that webkit specific value are accessible through 2 names: I'm currently not sure if this PR will implement both of them (test case looks like it is) |
BTW allProperties define only 1 webkit property alone, |
Not working on this one at the moment |
Seems like they were never tested. I'm not sure if the two added tests can be fixed with independent commits.