Skip to content

Commit b4ab7ad

Browse files
committed
added inner depth : #3
1 parent 275fac8 commit b4ab7ad

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

dist/js/o.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/orphic.js

+10
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function OrphicUI() {
154154
dropMode: 'o-drop',
155155
boxMode: 'o-box',
156156
textMode: 'o-text',
157+
innerMode: 'o-in',
157158
none: 'o-none'
158159
}
159160

@@ -398,6 +399,15 @@ function OrphicUI() {
398399
let fval = `${val1}, ${val2}`;
399400
cssProps.push(this._styler.createProperty("text-shadow", fval));
400401
}
402+
else if(depthVal[this._depthList.innerMode] === '<unknown>')
403+
{
404+
// console.log("BoxShadow");
405+
let depthProps = this._getDepthProps(depthVal, theme);
406+
let val1 = `inset -${depthProps.left}px -${depthProps.top}px ${depthProps.blur}px ${depthProps.spread}px ${depthProps.color1}`;
407+
let val2 = `inset ${depthProps.right}px ${depthProps.bottom}px ${depthProps.blur}px ${depthProps.spread}px ${depthProps.color2}`;
408+
let fval = `${val1}, ${val2}`;
409+
cssProps.push(this._styler.createProperty("box-shadow", fval));
410+
}
401411
else if(depthVal[this._depthList.boxMode] === '<unknown>')
402412
{
403413
// console.log("BoxShadow");

tests/o.html

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119

120120
<div class="custom-aligner">
121121

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

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

0 commit comments

Comments
 (0)