Add more classes for styling

Created on 28 March 2024, 3 months ago
Updated 24 April 2024, about 2 months ago

Problem/Motivation

Our designers want the ability to style the individual parts of our dates and need more classes to do so, so expanding on this https://www.drupal.org/project/smart_date/issues/3174063 β†’

They want to be able to theme for example "Mon" from "Mon, Mar 20th" as a different font and color.

So currently its

<span class="smart-date--date">Mar 28</span>
<span class="smart-date--date">Thu, Mar 28 2024</span>

And we would like it more like

<span class="smart-date--date"><span class="part-m">Mar</span> <span class="part-j">28</span></span>
<span class="smart-date--date"><span class="part-d,">Thu,</span> <span class="part-m">Mar</span> <span class="part-j">28</span> <span class="part-y">2024</span></span>

That way we can theme dates like

Steps to reproduce

Proposed resolution

Adjust existing code to add more classes when that option is enabled.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States NicholasS

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024