Skip to content

Commit

Permalink
v1.0.0-beta.22
Browse files Browse the repository at this point in the history
  • Loading branch information
tenphi authored Mar 9, 2021
2 parents 3f0f673 + 71e8ab7 commit 3f106c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "numl",
"version": "1.0.0-beta.21",
"version": "1.0.0-beta.22",
"module": "dist/index.js",
"homepage": "https://numl.design",
"repository": {
Expand Down
13 changes: 6 additions & 7 deletions src/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,6 @@ const globalRules = [`
--lg: 1.5rem;
--xl: 2rem;
--xxl: 3rem;
--icon-stroke-width: calc(1em / 14);
}`,

`:root:not([data-nu-prevent-reset]) body {
Expand Down Expand Up @@ -511,14 +509,15 @@ const globalRules = [`

`[nu-hidden] {
display: none !important;
}
}`,

.ionicon-fill-none {
`.ionicon-fill-none {
fill: none;
}
}`,

.ionicon-stroke-width {
stroke-width: calc(var(--icon-stroke-width) * 512 / 16);
`.ionicon-stroke-width {
--local-stroke-width: var(--icon-stroke-width, 2px);
stroke-width: calc(var(--local-stroke-width) * 16);
}`,

...(SCROLLBAR ? generateCSS('body', scrollbarAttr('yes'), false) : [])];
Expand Down
10 changes: 5 additions & 5 deletions src/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let ION_CACHE;

function ionIconsLoader(name) {
if (!ION_CACHE) {
ION_CACHE = fetch(`https://unpkg.com/ionicons@5/dist/ionicons.symbols.svg`)
ION_CACHE = fetch(`https://cdn.jsdelivr.net/npm/ionicons@5/dist/ionicons.symbols.svg`)
.then(response => response.ok ? response.text() : '')
.then(str => {
const el = h('div');
Expand Down Expand Up @@ -36,7 +36,7 @@ async function featherIconsLoader(name) {
name = name.replace('-outline', '');

if (!FEATHER_CACHE) {
FEATHER_CACHE = fetch(`https://unpkg.com/feather-icons@4/dist/icons.json`)
FEATHER_CACHE = fetch(`https://cdn.jsdelivr.net/npm/feather-icons@4/dist/icons.json`)
.then(handleJSON);
}

Expand All @@ -45,7 +45,7 @@ async function featherIconsLoader(name) {

const contents = cache[name];

return `<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" style="stroke-width: var(--icon-stroke-width);" stroke-linecap="round" stroke-linejoin="round">${contents}</svg>`;
return `<svg viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" fill="none" style="stroke-width: var(--icon-stroke-width, 2px);" stroke-linecap="round" stroke-linejoin="round">${contents}</svg>`;
});
}

Expand All @@ -54,9 +54,9 @@ let EVA_CACHE;
async function evaIconsLoader(name) {
if (!EVA_CACHE) {
EVA_CACHE = Promise.all([
fetch('https://unpkg.com/eva-icons@1.1.3/fill-icons.json')
fetch('https://cdn.jsdelivr.net/npm/eva-icons@1/fill-icons.json')
.then(handleJSON),
fetch('https://unpkg.com/eva-icons@1.1.3/outline-icons.json')
fetch('https://cdn.jsdelivr.net/npm/eva-icons@1/outline-icons.json')
.then(handleJSON),
])
.then((maps) => {
Expand Down

0 comments on commit 3f106c6

Please sign in to comment.