Skip to content

Commit

Permalink
Fixed opacity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mudgen committed Sep 7, 2020
1 parent d420974 commit 1f81051
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
2 changes: 1 addition & 1 deletion dist/runcss.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.modern.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.modern.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runcss.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const card =
div.class`md:flex bg-white rounded-lg p-6`(
img.class`h-16 w-16 md:h-24 md:w-24 rounded-full mx-auto md:mx-0 md:mr-6`.src`./avatar.jpg`,
div.class`text-center md:text-left`(
h2.class`text-lg``Erin Lindford`,
h2.class`text-lg opacity-5``Erin Lindford`,
div.class`text-purple-500``Customer Support`,
div.class`text-gray-600``[email protected]`,
div.class`text-gray-600``(555) 765-4321`))
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="md:flex bg-white rounded-lg p-6">
<img class="h-16 w-16 md:h-24 md:w-24 rounded-full mx-auto md:mx-0 md:mr-6" src="avatar.jpg">
<div class="text-center md:text-left">
<h2 class="text-lg">Erin Lindford</h2>
<h2 class="text-lg opacity-25">Erin Lindford</h2>
<div class="text-purple-500">Customer Support</div>
<div class="text-gray-600">[email protected]</div>
<div class="text-gray-600">(555) 765-4321</div>
Expand Down
4 changes: 2 additions & 2 deletions src/runcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ let cls2process = newObject({
},
opacity: () => {
if (isNum(secondPart)) {
rule = 'opacity:' + 100 / secondPart
rule = 'opacity:' + secondPart / 100.0
}
},
transition: () => {
Expand Down Expand Up @@ -624,7 +624,7 @@ let cls2process = newObject({
let v = shadows[secondPart]
if (v) {
v = v.replace(/R/g, ' rgba(0, 0, 0, 0')
console.log(v)
// console.log(v)
rule = `-webkit-box-shadow:${v};box-shadow:` + v
}
},
Expand Down

0 comments on commit 1f81051

Please sign in to comment.