This commit is contained in:
yuanchuan 2022-10-31 18:28:08 +08:00
parent 5643b53a3d
commit a51db4e906
4 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,11 @@
## 0.30.6
I was wrong. Only set `background-size:100%` to `pattern`, `canvas`, and `shader`.
<br /> <br />
## 0.30.5
* Always add `background-size:100%` to background properties.

View File

@ -1,4 +1,4 @@
/*! css-doodle@0.30.5 */
/*! css-doodle@0.30.6 */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@ -4513,7 +4513,11 @@
}
}
if (prop === 'background' || prop === 'background-image') {
let is_bg = (prop === 'background' || prop === 'background-image');
let is_canvas = /\$\{canvas/.test(value);
let is_shader = /\$\{shader/.test(value);
let is_pattern = /\${pattern/.test(value);
if (is_bg && (is_canvas || is_shader || is_pattern)) {
rule += 'background-size: 100% 100%;';
}

4
css-doodle.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "css-doodle",
"version": "0.30.5",
"version": "0.30.6",
"description": "A web component for drawing patterns with CSS",
"main": "css-doodle.js",
"scripts": {