Skip to content

Commit

Permalink
added inner depth : #3
Browse files Browse the repository at this point in the history
  • Loading branch information
ashusharmadev committed Sep 1, 2022
1 parent 275fac8 commit b4ab7ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/js/o.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/js/orphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function OrphicUI() {
dropMode: 'o-drop',
boxMode: 'o-box',
textMode: 'o-text',
innerMode: 'o-in',
none: 'o-none'
}

Expand Down Expand Up @@ -398,6 +399,15 @@ function OrphicUI() {
let fval = `${val1}, ${val2}`;
cssProps.push(this._styler.createProperty("text-shadow", fval));
}
else if(depthVal[this._depthList.innerMode] === '<unknown>')
{
// console.log("BoxShadow");
let depthProps = this._getDepthProps(depthVal, theme);
let val1 = `inset -${depthProps.left}px -${depthProps.top}px ${depthProps.blur}px ${depthProps.spread}px ${depthProps.color1}`;
let val2 = `inset ${depthProps.right}px ${depthProps.bottom}px ${depthProps.blur}px ${depthProps.spread}px ${depthProps.color2}`;
let fval = `${val1}, ${val2}`;
cssProps.push(this._styler.createProperty("box-shadow", fval));
}
else if(depthVal[this._depthList.boxMode] === '<unknown>')
{
// console.log("BoxShadow");
Expand Down
1 change: 1 addition & 0 deletions tests/o.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@

<div class="custom-aligner">

<!-- o-in : for inner-shadows -->
<div class="o-orphic o-logo-wrapper bd-rd" data-osh="o-drop, left: 12, right: 12, top: 12, bottom: 12">

<div class="o-orphic-back bd-rd" data-oblur="none"></div>
Expand Down

0 comments on commit b4ab7ad

Please sign in to comment.