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: Add font patterns PoC #76

Merged
merged 14 commits into from
May 8, 2023
Merged

WIP: Add font patterns PoC #76

merged 14 commits into from
May 8, 2023

Conversation

danalvrz
Copy link
Contributor

No description provided.

@danalvrz danalvrz requested review from sneridagh and steffenri April 21, 2023 02:32
@steffenri
Copy link
Member

@danalvrz @sneridagh I really like this pattern thing and they way we approach styling with it.
My only problem with this is the naming. I think "first", "two" etc. is not descriptive enough. Could we maybe come up with better names?

@tisto
Copy link
Member

tisto commented Apr 24, 2023

@steffenri @danalvrz FYI: the naming "one, two", "first, second" was just a placeholder since we did not want to concern ourselves with finding proper names. We still have to come up with proper names that make more sense.

@sneridagh
Copy link
Member

@danalvrz I like the pattern names that you chose!

@tisto what do you think?

@danalvrz
Copy link
Contributor Author

danalvrz commented May 5, 2023

@sneridagh I made some changes to test the mapping, and combined approaches (semantic/descriptive). We can edit it down, or make any adjustments needed.

@sneridagh
Copy link
Member

@danalvrz LGTM! I would want to know what's your opinion and the DX of this approach. Let's talk later.

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

In general I think this looks great and the use of mixins seems really nice for when we want to reuse the same styles with multiple selectors.

I made a few comments/questions but they're all pretty minor and non-blocking.

@@ -15,6 +15,10 @@ div {
@include body-text();
}

strong > * {
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to do it for children of strong rather than strong itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When in Edit mode, the markup changes from just a strong/em to nested span elements, but I changed it to a less general approach.

Copy link
Member

Choose a reason for hiding this comment

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

@danalvrz I see, it's needed then because we have font styles assigned to the generic span selector. My gut feeling is that we should remove font styles from div and span so that they inherit from their container, but let's see what @sneridagh thinks.

line-height: 20px;
color: $black;
padding: 8px 20px;
@include body-text-bold();
Copy link
Member

Choose a reason for hiding this comment

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

It might be worth creating a mixin for all the button styles, since we also have buttons that are included in other blocks, etc.

@@ -12,33 +12,37 @@ span,
div {
Copy link
Member

Choose a reason for hiding this comment

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

We might want to take div out of this list; it's a bit surprising for divs to have their own font styles assigned rather than inheriting from their container.

Copy link
Member

@sneridagh sneridagh May 8, 2023

Choose a reason for hiding this comment

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

for sure, we can't style divs alone, as a rule of thumb, anywhere, unless there's no other way to do it.

@steffenri steffenri marked this pull request as ready for review May 8, 2023 07:41
@steffenri steffenri merged commit 4ef6d9d into main May 8, 2023
@steffenri steffenri deleted the add-font-patterns branch May 8, 2023 07:48
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.

5 participants