-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COMP]: Add layout utilities #98
Comments
@andrewrubin can you give another example? Something that we definitely use? |
No. No, I cannot π Any ideas? I'm happy to just add this specific helper, as needed, on projects. |
All good, let's leave this here and if something pops up we can come back to it. |
Some utilities I often find helpful are below. Should these be included in some kind of utility class stylesheet, or would we rather implement that on a per-project basis? These are, admittedly, pretty arbitrary. Let me know your thoughts @marlonmarcello @rvno @NicholasLancey ! .block {
display: block;
}
.relative {
position: relative;
}
.fill {
width: 100%;
}
.constrain {
max-width: 100%;
}
.center {
margin-inline: auto;
} |
I use pretty much all of those helpers frequently. I usually set up text alignment ones too, I feel it would be best to include these in some kind of utility stylesheet, purely because I see them so often in our codebases I just assume most projects already have them! |
Should we just move to tailwind?
---------------------------------------------------------------
Liam Egan | We The Collective Design Inc.
37 Dunlevy Ave.
Vancouver BC V6A 3A3
Phone: +1 (604) 363-6466
www.wethecollective.com
*I respectfully acknowledge and am honoured to live, work and play within
the ancestral, traditional, and unceded territory of the Coast Salish
Peoples, specifically the territory of the xΚ·mΙΞΈkΚ·ΙyΜΙm (Musqueam),
SαΈ΅wxΜ±wΓΊ7mesh (Squamish), and SelΜΓlΜwitulh (Tsleil-Waututh) Nations.*
β¦On Wed, May 1, 2024 at 11:54β―AM Nicholas Lancey ***@***.***> wrote:
I use pretty much all of those helpers frequently. I usually set up text
alignment ones too, txt-center, txt-left and txt-right.
I feel it would be best to include these in some kind of utility
stylesheet, purely because I see them so often in our codebases I just
assume most projects already have them!
β
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZJ2HPTVDZDXLS2XQDKZTZAE27HAVCNFSM6AAAAABCTSMANSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYHEZDEMJVGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for your input @NicholasLancey ! Aside: |
I am not sure if @liamegan was joking but he does have a point. If I remember when doing research for this Tailwind could:
We could use tailwind solely for these types of utilities, the ones that don't affect the visual parts of the website. Things like margin, padding, text alignment, display, overflow, etc, these are all just functional. Should we start an RFC? |
Found it. Disable classes: https://tailwindcss.com/docs/configuration#core-plugins |
Let's chat some time, now that we've used this for a few projects and have a better understanding of our needs. My initial concern which was having to learn a new framework still holds true but it might have less weight. |
@andrewrubin in out slack chat you mentioned that we should just import the utility css modules and use them directly like so: // components/my-component/my-component.tsx
import spacing from '@local/styles/spacing.module.scss
function Component {
return <div className={spacing.margin2} />
} I think this is a great idea and we should give it a shot. When you get a chance could explore that a bit more?
|
Even just a CSS file that gets added βΒ I think it will be useful to have Sass helpers like
@include full-absolute(4px)
(yes I'm aware of inset π )The text was updated successfully, but these errors were encountered: