UNPKG

normalize-unistyle

Version:
130 lines (110 loc) 7.19 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var INPUT_FIELDS = ['button', 'input', 'optgroup', 'select', 'textarea']; var BUTTONS = ['button', 'html input[type="button"]', 'input[type="reset"]', 'input[type="submit"]']; var DISABLEDS = ['button[disabled]', 'html input[disabled]']; var CHECKABLES = ['input[type="checkbox"]', 'input[type="radio"]']; exports['default'] = (_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup = {}, _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, INPUT_FIELDS, { /* Correct color not being inherited. Known issue: affects color of disabled elements. */ color: 'inherit', /* Correct font properties not being inherited. */ font: 'inherit', /* Address margins set differently in Firefox 4+, Safari, and Chrome. */ margin: 0 }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'button', { overflow: 'visible' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'button, select', { textTransform: 'none' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, BUTTONS, { /* Correct inability to style clickable `input` types in iOS. */ WebkitAppearance: 'button', /* Improve usability and consistency of cursor style between image-type `input` and others. */ cursor: 'pointer' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, DISABLEDS, { cursor: 'default' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'button::-moz-focus-inner, input::-moz-focus-inner', { border: 0, padding: 0 }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'input', { lineHeight: 'normal' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, CHECKABLES, { /* Address box sizing set to `content-box` in IE 8/9/10. */ boxSizing: 'border-box', /* Remove excess padding in IE 8/9/10. */ padding: 0 }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, ['inner', 'outer'].map(function (type) { return 'input[type="number"]::-webkit-' + type + '-spin-button'; }), { height: 'auto' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'input[type="search"]', { /* Address `appearance` set to `searchfield` in Safari and Chrome. */ WebkitAppearance: 'textfield', /* Address `box-sizing` set to `border-box` in Safari and Chrome. */ boxSizing: 'content-box' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, ['cancel-button', 'decoration'].map(function (type) { return 'input[type="search"]::-webkit-search-' + type; }), { WebkitAppearance: 'none' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'fieldset', { border: '1px solid #c0c0c0', margin: '0 2px', padding: '0.35em 0.625em 0.75em' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'legend', { /* Correct `color` not being inherited in IE 8/9/10/11. */ border: 0, /* Remove padding so people aren't caught out if they zero out fieldsets. */ padding: 0 }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'textarea', { overflow: 'auto' }), _defineProperty(_INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup, 'optgroup', { fontWeight: 'bold' }), _INPUT_FIELDS$button$buttonSelect$BUTTONS$DISABLEDS$buttonMozFocusInnerInputMozFocusInner$input$CHECKABLES$map$inputTypeSearch$map$fieldset$legend$textarea$optgroup); module.exports = exports['default']; /** * Address `overflow` set to `hidden` in IE 8/9/10/11. */ /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. * Correct `select` style inheritance in Firefox. */ /* Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. */ /** * Re-set default cursor for disabled elements. */ /** * Remove inner padding and border in Firefox 4+. */ /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ /** * It's recommended that you don't attempt to style these elements. * Firefox's implementation doesn't respect box-sizing, padding, or width. */ /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain * `font-size` values of the `input`, it causes the cursor style of the * decrement button to change from `default` to `text`. */ /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. * Safari (but not Chrome) clips the cancel button when the search input has * padding (and `textfield` appearance). */ /** * Define consistent border, margin, and padding. */ /** * Remove default vertical scrollbar in IE 8/9/10/11. */ /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */