The CSS box-shadow supports a property called inset, which causes the box-shadow to be rendered inside the element:
Withoutinset:
Withinset:
We use this inner-box-shadow styling in Oni's tab-bar to create the illusion of depth:
The README.md and Theme.re both have this style applied to make it appear they are 'underneath' the editor surface. It would be cool if we had that styling capability for Oni2, as well.
I think the approach would be quite similiar to the approach @Akin909 took with #107 - it'd just be about rendering the shadow above the element, and positioning it correctly in the inset case.
The CSS
box-shadow
supports a property calledinset
, which causes the box-shadow to be rendered inside the element:Without
inset
:With
inset
:We use this inner-box-shadow styling in Oni's tab-bar to create the illusion of depth:
The
README.md
andTheme.re
both have this style applied to make it appear they are 'underneath' the editor surface. It would be cool if we had that styling capability for Oni2, as well.I think the approach would be quite similiar to the approach @Akin909 took with #107 - it'd just be about rendering the shadow above the element, and positioning it correctly in the inset case.