Skip to content
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

Consider consistent typography approach #1552

Open
tomdye opened this issue Oct 9, 2020 · 0 comments
Open

Consider consistent typography approach #1552

tomdye opened this issue Oct 9, 2020 · 0 comments
Labels
medium priority medium Medium size issue

Comments

@tomdye
Copy link
Member

tomdye commented Oct 9, 2020

Enhancement

When writing apps with consistent headings / subheadings etc it may be useful to provide a consistent approach.
This could be accomplished via css modules to be imported where required or by Widgets representing each typography type.

css-modules

a css file like

.heading1 {
   font-size: 28px;
}
.heading2 {
   font-size: 20px;
}

could be imported and used as such.

import * as typography from '@dojo/widgets/typography';

return (
   ...
   <span classes={typography.heading1}>Title</span>
   <span classes={typography.heading2}>Sub Title</span>
   ...
);

widgets

import { Heading1, Heading2  } from '@dojo/widgets/typograhy';

return (
   ...
   <Heading1>Title</Heading1>
   <Heading2>Sub Title</Heading2>
   ...
);
@tomdye tomdye added medium Medium size issue medium priority labels Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium priority medium Medium size issue
Projects
None yet
Development

No branches or pull requests

1 participant