Add a layout/flex:basis atom for flex-basis - #103
Open
eastagiletracker wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes a
layout/flex:basisatom, soflex-basiscan be set from a class the same waylayout/widthalready setswidth(fixes #94). We include this PR work along with a full history of your repo at https://eastagiletracker.com/projects/368. You can sign in with your GitHub ID to claim ownership of the project.What this adds
layout/flexcurrently exposesgrowandshrink, but there is no atom for the third part of the shorthand, so a flex child that needs a main-axis size has to fall back to an inline style or a one-off class. Onmainat86ddc5d, a fresh build has no such declaration anywhere:The change is 12 lines in
src/stylesheets/atoms/_layout.scss, inside the existing@include atom(flex)block and directly aftergrow, shrink. It follows thelayout/widthshape exactly: the base class setsflex-basis: var(--layout--flex--basis)so any value can be inlined, andvariant-percentages— the same mixinlayout/widthuses — generates0%–100%in 5% steps plus the accurate33%/66%, along with theautoandclearresets. The breakpoint prefixes come along for free, so@768/layout/flex:basis:50%works like every other layout atom. 390 selectors in total: 26 classes across the base rendering and the 14 breakpoints.How it was verified
Rebuilding
dist/sol.cssbefore and after and diffing the two 4.4 MB files: every substantive added line is alayout/flex:basisselector or one of its custom-property declarations, nothing was removed, and no other rule moved. Sass's warning output is byte-identical between the two builds, so nothing new is flagged at build time. The stylesheet grows by 44,179 bytes, 1.00%.Behavior was checked in a real browser against both builds — three flex children in a 600px
layout/flex:rowcontainer, reading computed style:yarn testis green on both trees — 3 suites, 44 tests, no change either way. I did not add a Sass test for this: there is no CSS test harness in the repo today, and a fullmain.scsscompile takes about five minutes here, so adding one toyarn testseemed like your call to make rather than mine. The build-and-grep above replays the compiled half in one command, and the browser check is alayout/flex:rowcontainer with the three children above.The change is purely additive — no existing class, placeholder or custom property is renamed, removed or redefined, and the new atom does not
@extendinto anything that already exists.How this was managed
Your issues and pull requests were imported into a board (102 stories, 5 labels), and this work was tracked on it as Add atom for
flex-basis, on the board at https://eastagiletracker.com/projects/368.If you'd rather not receive contributions like this, reply
no-more-prson this pull request and we won't open any further ones on your repositories.Lawrence W. Sinclair
CEO / East Agile
linkedin.com/in/lwsinclair/
eastagile.com