-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autoprefix the file-selector-button pseudo-element (#1412)
* Autoprefix the file-selector-button pseudo-element Prototype using MDN compat data where caniuse is not usable. * Hardcode data instead of using MDN * Add test to hacks block
- Loading branch information
1 parent
05cfed6
commit 5468c9f
Showing
6 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
let Selector = require('../selector') | ||
|
||
class FileSelectorButton extends Selector { | ||
/** | ||
* Return different selectors depend on prefix | ||
*/ | ||
prefixed(prefix) { | ||
if (prefix === '-webkit-') { | ||
return '::-webkit-file-upload-button' | ||
} | ||
return `::file-selector-button` | ||
} | ||
} | ||
|
||
FileSelectorButton.names = ['::file-selector-button'] | ||
|
||
module.exports = FileSelectorButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
::file-selector-button { | ||
background: black | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
::-webkit-file-upload-button { | ||
background: black | ||
} | ||
::file-selector-button { | ||
background: black | ||
} |