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

WIP linaria typography prototype #218

Closed
wants to merge 7 commits into from
Closed

Conversation

anniehu4
Copy link
Contributor

@anniehu4 anniehu4 commented Dec 8, 2020

Summary:

haven't set up Babel or anything so npm start doesn't work yet :')

Test Plan:

@anniehu4 anniehu4 marked this pull request as draft December 8, 2020 00:26
@anniehu4 anniehu4 changed the title WIP linaria typography WIP linaria typography prototype Dec 8, 2020
const TypographyComponent = styledComponentFromSize(size);
return (
<TypographyComponent
as={as || elementFromSize(size)}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulled this from the Along component, but I can't tell how it works 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to the as prop, specifically?

If so, as is a prop from styled-components, so I wouldn't expect it to work here.

The intent is that someone can specify that they want something to look like an h2 (or h1, h3, whatever), but actually be something else (to fit into the document structure).

Copy link
Contributor Author

@anniehu4 anniehu4 Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh ok that makes much more sense. I was going crazy trying to figure out where as was actually being implemented

@anniehu4 anniehu4 linked an issue Dec 8, 2020 that may be closed by this pull request
size: TypographySize;
};

const typography = styled.span`
Copy link
Contributor

@ahuth ahuth Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linaria has a couple different APIs, and it would be interesting to think about which ones we want to use (and when, and why).

@anniehu4 anniehu4 changed the base branch from ahu/add-font-tokens to ahu/linaria-twin December 9, 2020 00:46
@@ -0,0 +1,17 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are from #207 -- still planning to land separately, but I had to update the base branch since I split the linaria/twin.macro imports to another PR

@anniehu4 anniehu4 added this to the Typography milestone Dec 9, 2020
@anniehu4 anniehu4 force-pushed the ahu/linaria-twin branch 2 times, most recently from 2486ff9 to 22a6cbb Compare December 10, 2020 16:47
@anniehu4
Copy link
Contributor Author

revisit when we switch to linaria + twin.macro

@anniehu4 anniehu4 closed this Dec 15, 2020
@booc0mtaco booc0mtaco deleted the ahu/linaria-type branch March 8, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to CSS-in-JS for Styling Purposes
2 participants