
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
foldable-device-configurator
Advanced tools
A simple web component which you can add to emulate various type of foldables devices. It will set the appropriate media queries according to the device and the setup.
Foldable Device Configurator is a little Web Component which you can drop in your application to test the CSS Viewport Segments Polyfill located here
$ npm install --save-dev foldable-device-configurator
You then need to import the ESM module into your project (which depends on how you import ES modules), here is an example :
<script type='module' src="../node_modules/foldable-device-configurator/src/foldable-device-configurator.js"></script>
When imported, in your HTML file just add the following lines:
<foldable-device-configurator></foldable-device-configurator>
This web component will let you emulate various foldable configurations and will set the foldable polyfills accordingly. Currently there are two polyfills you can use to design or adapt web contents for foldable devices :
Both are proposals from Microsoft. At this time the configurator will only set the viewportsegments media-queries.
:warning: The two aforementioned APIs are early work in progress and are subject to change anytime.
This project makes use of ECMAScript Modules (ESM) and runs them directly in the browser using Snowpack. If you install new dependencies using npm
like npm install --save @material/mwc-button
, then please run npx snowpack
afterwards to generate the new modules in web_modules
folder. Also, the web_modules
folder should be committed. Make sure to update the package.json file accordingly.
To install app dependencies and but any further steps, run
$ npm install
ESM compatible modules can be found using pika.dev. Material design web components can be found by searching for @material/mwc-
. You can try out the demo page here: Material Web Components demo
Then run
$ npm run build
To test in the browser, run
$ npm run start
To build, run
$ npm run build
The build is then ready to publish to npm (inside the dist/ directory)
This demo is being developed by :
FAQs
A simple web component which you can add to emulate various type of foldables devices. It will set the appropriate media queries according to the device and the setup.
We found that foldable-device-configurator demonstrated a not healthy version release cadence and project activity because the last version was released 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
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.