Socket
Socket
Sign inDemoInstall

polythene-theme

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polythene-theme - npm Package Compare versions

Comparing version 0.1.19 to 0.1.20

common/no-tap-delay.es6.js

3

package.json
{
"name": "polythene-theme",
"version": "0.1.19",
"version": "0.1.20",
"description": "Polythene default theme",

@@ -9,2 +9,3 @@ "license": "MIT",

"dependencies": {
"fastclick": "^1.0.6",
"j2c": "^0.7.3"

@@ -11,0 +12,0 @@ },

@@ -164,2 +164,3 @@ # Polythene-theme

* `object.assign`: Polyfill
* `no-tap-delay`: Wrapper around Fastclick to handle taps when scrolling
* `styler`: Wrapper around j2c to add styles to the head

@@ -169,2 +170,11 @@ * `webfontloader`: See below

## No tap delay
To remove the tap delay on mobile it is advisable to use a library like [Fastclick](https://github.com/ftlabs/fastclick). But because Fastclick has an unresolved issue with tap events while scrolling on iOS, it is better to use the convenience wrapper provided in the default theme. This temporarily removes the Fastclick event an element is scrolled.
~~~javascript
import noTapDelay from 'polythene-theme/common/no-tap-delay';
~~~
### Vendor prefixes

@@ -171,0 +181,0 @@

@@ -0,1 +1,2 @@

import p from 'polythene/polythene/polythene';
import styler from 'polythene-theme/common/styler';

@@ -23,7 +24,2 @@

styler.add('polythene-style-theme', theme, roboto);
// Add touch class to remove hovers on touch devices
const isTouchDevice = () => {
return (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
};
document.querySelector('html').classList.add(isTouchDevice() ? 'touch' : 'no-touch');
document.querySelector('html').classList.add(p.isTouch() ? 'touch' : 'no-touch');

@@ -1,1 +0,1 @@

"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polytheneThemeCommonStyler=require("polythene-theme/common/styler");var _polytheneThemeCommonStyler2=_interopRequireDefault(_polytheneThemeCommonStyler);require("polythene-theme/layout/layout");require("polythene-theme/font-roboto/font-roboto");var _polytheneThemeThemeThemeStyle=require("polythene-theme/theme/theme-style");var _polytheneThemeThemeThemeStyle2=_interopRequireDefault(_polytheneThemeThemeThemeStyle);var roboto=[{"html, body":{"font-family":"Roboto, Helvetica, Arial, sans-serif"},"b, strong":{"font-weight":500}}];_polytheneThemeCommonStyler2["default"].add("polythene-style-theme",_polytheneThemeThemeThemeStyle2["default"],roboto);var isTouchDevice=function isTouchDevice(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0};document.querySelector("html").classList.add(isTouchDevice()?"touch":"no-touch");
"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _polythenePolythenePolythene=require("polythene/polythene/polythene");var _polythenePolythenePolythene2=_interopRequireDefault(_polythenePolythenePolythene);var _polytheneThemeCommonStyler=require("polythene-theme/common/styler");var _polytheneThemeCommonStyler2=_interopRequireDefault(_polytheneThemeCommonStyler);require("polythene-theme/layout/layout");require("polythene-theme/font-roboto/font-roboto");var _polytheneThemeThemeThemeStyle=require("polythene-theme/theme/theme-style");var _polytheneThemeThemeThemeStyle2=_interopRequireDefault(_polytheneThemeThemeThemeStyle);var roboto=[{"html, body":{"font-family":"Roboto, Helvetica, Arial, sans-serif"},"b, strong":{"font-weight":500}}];_polytheneThemeCommonStyler2["default"].add("polythene-style-theme",_polytheneThemeThemeThemeStyle2["default"],roboto);document.querySelector("html").classList.add(_polythenePolythenePolythene2["default"].isTouch()?"touch":"no-touch");
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc