conceal-reveal
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -127,3 +127,3 @@ "use strict"; | ||
var originalHeight = (element.dataset[DATASET_ORIGINAL_INLINE_STYLE_HEIGHT] || '').split(' !'); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1]); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1] || ''); | ||
} | ||
@@ -130,0 +130,0 @@ function saveOriginalImportantInlineStyles(element) { |
@@ -121,3 +121,3 @@ export var CLASS_CONCEALED = 'concealed'; | ||
var originalHeight = (element.dataset[DATASET_ORIGINAL_INLINE_STYLE_HEIGHT] || '').split(' !'); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1]); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1] || ''); | ||
} | ||
@@ -124,0 +124,0 @@ function saveOriginalImportantInlineStyles(element) { |
@@ -15,4 +15,4 @@ export var CLASS_CONCEALED="concealed" | ||
e.dataset[t]=(e.style.height||"")+(o?" !"+o:"")}function n(e){var o=(e.dataset[t]||"").split(" !") | ||
e.style.setProperty("height",o[0],o[1])}function s(t){var o=t.dataset[e] | ||
e.style.setProperty("height",o[0],o[1]||"")}function s(t){var o=t.dataset[e] | ||
if(o)for(var r=/\s*([^:\s]+)\s*:\s*([^;\s]+)\s*;?/g,a=void 0;a=r.exec(o);)t.style.setProperty(a[1],a[2],"important")}function d(t){for(var e=0,r=o;e<r.length;e++){var a=r[e] | ||
"important"===t.style.getPropertyPriority(a)&&t.style.removeProperty(a)}} |
@@ -124,3 +124,3 @@ var ConcealReveal = (function (exports) { | ||
var originalHeight = (element.dataset[DATASET_ORIGINAL_INLINE_STYLE_HEIGHT] || '').split(' !'); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1]); | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1] || ''); | ||
} | ||
@@ -127,0 +127,0 @@ function saveOriginalImportantInlineStyles(element) { |
@@ -13,4 +13,4 @@ var ConcealReveal=function(t){"use strict" | ||
t.dataset[s]=(t.style.height||"")+(e?" !"+e:"")}function f(t){var e=(t.dataset[s]||"").split(" !") | ||
t.style.setProperty("height",e[0],e[1])}function p(t){var e=t.dataset[d] | ||
t.style.setProperty("height",e[0],e[1]||"")}function p(t){var e=t.dataset[d] | ||
if(e)for(var i=/\s*([^:\s]+)\s*:\s*([^;\s]+)\s*;?/g,r=void 0;r=i.exec(e);)t.style.setProperty(r[1],r[2],"important")}function y(t){for(var e=0,i=l;e<i.length;e++){var r=i[e] | ||
"important"===t.style.getPropertyPriority(r)&&t.style.removeProperty(r)}}return t.CLASS_CONCEALED=o,t.CLASS_CONCEALING=a,t.CLASS_REVEALING=n,t.concealed=c,t.conceal=e,t.reveal=i,t.toggle=function(t){(c(t)?i:e)(t)},t}({}) |
{ | ||
"name": "conceal-reveal", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A tiny vanilla-js library to conceal/reveal elements", | ||
@@ -5,0 +5,0 @@ "repository": "luncheon/conceal-reveal.js", |
@@ -42,4 +42,4 @@ # conceal-reveal.js | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.0/css/conceal-reveal.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.0"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.1/css/conceal-reveal.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.1"></script> | ||
<script> | ||
@@ -53,5 +53,5 @@ const { conceal, concealed, reveal, toggle } = ConcealReveal | ||
```html | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.0/css/conceal-reveal.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.1/css/conceal-reveal.min.css"> | ||
<script type="module"> | ||
import { conceal, concealed, reveal, toggle } from "https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.0/es/conceal-reveal.min.js" | ||
import { conceal, concealed, reveal, toggle } from "https://cdn.jsdelivr.net/npm/conceal-reveal@0.1.1/es/conceal-reveal.min.js" | ||
</script> | ||
@@ -58,0 +58,0 @@ ``` |
@@ -134,3 +134,3 @@ export const CLASS_CONCEALED = 'concealed' | ||
const originalHeight = (element.dataset[DATASET_ORIGINAL_INLINE_STYLE_HEIGHT] || '').split(' !') | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1]) | ||
element.style.setProperty('height', originalHeight[0], originalHeight[1] || '') | ||
} | ||
@@ -137,0 +137,0 @@ |
Sorry, the diff of this file is not supported yet
48989