Comments (10)
the next version of glamor should do this automatically
from glamor.
Placeholder is still not vendor prefixing:
import React from 'react'
import {css} from 'glamor'
const styles = {
'::placeholder': {
color: 'red'
}
}
export default () => (
<input className={css(styles)} placeholder='Test' />
)
Results in this output in the head stylesheet:
.css-f6kjmy::placeholder,[data-css-f6kjmy]::placeholder,.css-f6kjmy[data-simulate-placeholder],[data-css-f6kjmy][data-simulate-placeholder]{color:red;}
from glamor.
I think I figured out how to resolve it. Working on a PR.
from glamor.
Good catch, I didn't know this. I should be able to add it. As a workaround for now, try this undocumented method - add(':-webkit-input-placeholder', style)
(note the single colon, not double)
from glamor.
Cool! I ended up with this:
const placeholder = (x) => ({
...add(':placeholder', x),
...add(':-webkit-input-placeholder', x),
...add(':-moz-placeholder', x),
...add(':-ms-input-placeholder', x),
})
from glamor.
✌️
from glamor.
ah, it doesn't do it for the nested version, only when using the helper. will fix.
from glamor.
fixed in 2.20.14
from glamor.
It isn't working right now.
Glamor put all vendor prefixes in a single comma separated rule:
Lines 322 to 325 in 09dd49d
But it doesn't work. I found why here: http://stackoverflow.com/a/23338422/2379685
...if any selector in your comma separated list is not recognized by your browser, it skips the whole rule and goes on to the next.
You can test it in this fiddle using chrome:
https://jsfiddle.net/Lcjfkrb2/
Also, you can go to https://autoprefixer.github.io/ and paste:
input::placeholder {
color: red
}
The result will be:
input::-webkit-input-placeholder {
color: red
}
input::-moz-placeholder {
color: red
}
input:-ms-input-placeholder {
color: red
}
input::placeholder {
color: red
}
Couldn't this be handled by autoprefixer instead of hard coded?
from glamor.
Done!
from glamor.
Related Issues (20)
- css.global doesn't support hover?
- Font Face Multiple Font Support HOT 1
- Promote css prop with react usage
- Deleting rules from the stylesheet
- Calling css({'data-css-nil': ''}) throws unexpected error HOT 1
- glamor-skeleton help
- psudeo element: scrollbar is not working
- Server-side rendering styles from a third-party library
- Values for the non-standard properties being set as numbers becomes as string with `px` concatenated in output HOT 4
- When NODE_ENV=production hydratation is broken
- Missing .d.ts for "glamor/server" HOT 1
- Outdated index.d.ts published HOT 1
- babel 7 support
- how to use -webkit-line-clamp HOT 1
- How to change src when the img hover ?
- Speedy mode is harmful for some production use cases (f.e. server-side rendering, prerendering, especially when glamor used in the library, etc)
- Generate inline style attribute text. HOT 3
- FBJS library causing vulnerability HOT 1
- className did not match
- update to a maintained `through`?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glamor.