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: Update Tailwind to 3.4 to allow subgrid and update news card to use subgrid as example. #772

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dipakmdhrm
Copy link
Collaborator

@dipakmdhrm dipakmdhrm commented Dec 20, 2024

Update:

  • Update Tailwind to 3.4 to allow subgrid
  • Update news card to use subgrid as example.

You'll notice for Desktop and Tablet that after using subgrid, each element of a card is in alignment with the corresponding element of all other cards in the same row, which wasn't the case before subgrid. Check description for eg.

___ Before After
lg desktop-before desktop-after
md tablet-before tablet-after
sm mobile-before mobile-after

@dipakmdhrm dipakmdhrm changed the title Update Tailwind to 3.4 to allow subgrid and update news card to use subgrid as example. WIP: Update Tailwind to 3.4 to allow subgrid and update news card to use subgrid as example. Dec 20, 2024
@dipakmdhrm
Copy link
Collaborator Author

More work is needed here. subgrid elements are inheriting the parent's gap which is messing with the gap between elements.

$description = $this->wrapTextLineClamp($summary, 4);

return [
'#theme' => 'server_theme_element__news_card',
Copy link
Member

Choose a reason for hiding this comment

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

We should not take this approach. Our approach is in fact the exact opposite. We prefer to break down those twigs, in favor of composing elements -- just like in the existing code.

Comment on lines +487 to +497
$info['server_theme_element__news_card'] = [
'variables' => [
'image' => NULL,
'labels' => NULL,
'date' => NULL,
'title' => NULL,
'description' => NULL,
'url' => NULL,
],
];

Copy link
Member

Choose a reason for hiding this comment

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

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.

2 participants