Socket
Socket
Sign inDemoInstall

csstype

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csstype - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

flow-typed/csstype.js

10

package.json
{
"name": "csstype",
"version": "1.5.0",
"version": "1.6.0",
"main": "index.d.ts",

@@ -12,6 +12,7 @@ "description": "TypeScript definitions for CSS",

"@types/jest": "^22.1.1",
"@types/node": "^9.4.0",
"@types/node": "^9.4.2",
"@types/prettier": "^1.10.0",
"chokidar": "^2.0.0",
"jest": "^22.1.4",
"flow-bin": "^0.65.0",
"jest": "^22.2.1",
"mdn-data": "1.1.0",

@@ -34,4 +35,5 @@ "prettier": "^1.10.2",

"files": [
"index.d.ts"
"index.d.ts",
"flow-typed/"
]
}

30

README.md
# CSSType
TypeScript definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values.
TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values.

@@ -16,5 +16,6 @@ ```ts

```bash
$ npm install csstype@latest # For projects
$ npm install csstype@* # For libraries
```sh
$ npm install csstype
$ # or
$ yarn add csstype
```

@@ -24,3 +25,3 @@

Lengths defaults to `string`. But it's possible to add `number` as well using generics.
Lengths defaults to `string | number`. But it's possible to override it using generics.

@@ -30,4 +31,4 @@ ```ts

const style: CSS.Properties<string | number> = {
padding: 10,
const style: CSS.Properties<string> = {
padding: '10px',
margin: '1rem',

@@ -62,1 +63,16 @@ }

```
Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`.
```ts
import * as CSS from 'csstype';
interface Style extends CSS.Properties, CSS.PropertiesHyphen { }
const style: Style = {
'flex-grow': 1,
'flex-shrink': 0,
'font-weight': 'normal',
backgroundColor: 'white',
}
```

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc