0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 20:12:40 +00:00

Refactor AnchoredBox for greater flexibility

Big change to how the AnchoredBox component is structured so that it can be used in more than just one spot.  Now composed of the wrapper Anchored, with two children AnchoredTrigger and AnchoredBox, each of which can have their own arbitrary children.

Next steps will involve renaming the component file to Anchored.jsx, moving most styling out of the attached stylesheet (and into brewRenderer.less), and adding props to pass in Anchor Positioning properties.
This commit is contained in:
Gazook89
2024-10-12 23:12:27 -05:00
parent 27f471791d
commit 1741abc3fe
3 changed files with 83 additions and 69 deletions

View File

@@ -1,17 +1,13 @@
.anchored-trigger {
@supports (anchor-name: --view-settings){
anchor-name: --view-settings;
}
&.active {
background-color: #444444;
}
}
.anchored-box {
position:absolute;
top: 30px;
@supports (position-anchor: --view-settings){
position-anchor: --view-settings;
@supports (inset-block-start: anchor(bottom)){
inset-block-start: anchor(bottom);
}
justify-self: anchor-center;