Skip to content

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.

3 participants