Product
Introducing Java Support in Socket
We're excited to announce that Socket now supports the Java programming language.
@react-pdf/stylesheet
Advanced tools
React-pdf styles engine
yarn add @react-pdf/stylesheet
const stylesheet = require('@react-pdf/stylesheet');
const container = {
width: 400,
height: 600,
orientation: 'portrait',
};
const style = {
margin: 20,
width: '50vw',
height: '20vh',
borderRadius: 5,
fontWeight: 'semibold',
borderBottom: '2 solid yellow',
'@media max-width: 500': {
backgroundColor: 'rgb(255, 0, 0)',
},
};
const computed = stylesheet(container, style);
// Computed
// {
// width: 200,
// height: 120,
// marginTop: 20,
// marginLeft: 20,
// marginRight: 20,
// marginBottom: 20,
// marginBottom: 20,
// borderTopLeftRadius: 5,
// borderTopRightRadius: 5,
// borderBottomLeftRadius: 5,
// borderBottomRightRadius: 5,
// fontWeight: 600,
// borderBottomWidth: 2,
// borderBottomStyle: 'solid',
// borderBottomColor: 'yellow',
// backgroundColor: '#FF0000'
// }
This library exports a stylesheet
function that takes two arguments:
width
and height
in points (needed for media queries and unit conversions), and optionally the container orientation
(needed for certain media queries).MIT © Diego Muracciole
FAQs
A styles engine for Node and the browser
The npm package @react-pdf/stylesheet receives a total of 404,240 weekly downloads. As such, @react-pdf/stylesheet popularity was classified as popular.
We found that @react-pdf/stylesheet demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We're excited to announce that Socket now supports the Java programming language.
Security News
Socket detected a malicious Python package impersonating a popular browser cookie library to steal passwords, screenshots, webcam images, and Discord tokens.
Security News
Deno 2.0 is now available with enhanced package management, full Node.js and npm compatibility, improved performance, and support for major JavaScript frameworks.