Comments (7)
Not sure on this one – but I think it depends on how you think changing them would be useful.
Most of the time, the .h1/.alpha
classes should be used for overriding the base header sizes. By making them more generic, it’s encouraging more use of classes on elements outside of this to set font-size.
I’m unsure if this is a good thing or not – personally, I would rather people use the $type-
variables in their Sass than to use .type-
classes in the HTML. At least that way if you ever change one of them and need to see what it will affect, you don’t have to then search throughout your markup for what components use that type-size – instead it’s all within your CSS.
Not sure if I’m missing something that makes more of a case for the pros in changing them though?
from kickoff.
Agreed, I think we should try to enforce more rules on good typography and sizing. Allowing helper classes like this would perhaps mean lot's of shoe-horning of the design and weird font-sizing? I like it is currently, just need to be more strict with them personally.
from kickoff.
you don’t have to then search throughout your markup for what components use that type-size – instead it’s all within your CSS.
@ashleynolan isn't this the case already? These would replace the .h1
and .alpha
to something that is more universal/able to be used on smaller sizes.
I like the idea of being able to give an element the font-size of an h1
but not all it's other styling (margins etc). I also think that it more clearly shows users what each major element's font sizes are.
from kickoff.
It’s the case for headers, for sure, but it would then become a larger issue with type-specific classes being used potentially for anything. I think having header classes like .h1
/.alpha
isn’t ideal either, but it’s a common use-case and so solves a fixed problem.
I think it is making the markup more tightly coupled to a styling variable that is prone to change and could potentially cause issues down the line. Changing the size of one of my type variables would require me to hunt down uses throughout the markup and possibly JS (if people added classes/markup in there too). Again, this would happen with the heading helper classes currently but at least by it’s definition it’s implied to be limited to use with headers.
I just think font-size, like colour, is too vulnerable to change from my experience – having helper layout classes is more robust and makes sense – it would be like having a .color-primary
class to add to elements. It makes things more fragile.
from kickoff.
OK, you make a good case, I do not think this is a good idea, but should we remove the .h1
/ .alpha
classes then? Devs can add them if they need to..
from kickoff.
I don’t mind – I guess it’s weighing up the usefulness versus the fragility of them.
I think they’re pretty useful just for header sizing, but if we think it’d be better to get rid of them – or at least one of them as I don’t think we need both in there – then that could be a good idea.
from kickoff.
OK, @CiaranPark, what do you think?
from kickoff.
Related Issues (20)
- kickoff-react HOT 2
- Docs site down HOT 4
- Kickoff 8 checklist HOT 20
- Fix SVG minification HOT 3
- Finalise SVG sizing & correct CSS workflow
- Form themes HOT 1
- Hot module reloading HOT 1
- Production build requires optional dependencies HOT 5
- Generated CSS file not respect the name given in config.js HOT 1
- Kickoff Builds HOT 3
- problem with current grunt-contrib-imagemin version in package.json HOT 7
- When selecting statix in Yeoman generator missing comma in Gruntfile HOT 1
- Issue with grunt-icon/NPM, causing error HOT 1
- Remove Placeholder Mixin
- Version 7 - TODO HOT 27
- Moving to Gulp HOT 1
- KO FlexGrid HOT 11
- Broken link in Docs HOT 1
- Error in styleguide.scss HOT 3
- IE11 Printing Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kickoff.