Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Task/tup-674 Fix hanging indent #289

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Conversation

R-Tomas-Gonzalez
Copy link
Collaborator

Overview

Fixes hanging indent when an a tag is inside of a p tag that is a child of a card

Related

  • TUP-674
  • TUP-486 ( work was previously done for this ticket, that did not capture or account for the a tag inside of a p tag

Changes

  • adds in :--c-card > p > a:only-child:not(:--c-button) selector to display: flex

Testing

I created a test element in _c-card--many-variable.hbs as such, to test the anchor tag wraps as wanted:

<article class="c-card c-card--plain">
    <h3>Card - BLAH BLAH BLAH</h3>

    <p>If you wrap actions ("Action N") in a <kbd>&lt;p&gt;</kbd> tag, then spacing will be wrong.*</p>

    <p>
        <a href="#" class="c-button c-button--primary">Action 1</a>
        <a href="#" class="c-button c-button--primary">Action 2</a>
    </p>
    <p>
        <a href="#"><i class="icon icon-push-right">&gt;</i> Learn more Learn more Learn more Learn more Learn more</a>
    </p>
</article>

I deleted this and did not submit it up as to not clutter the card template. @wesleyboar please let me know if you'd like me to keep this in, or if you'd like to adjust more for the same situation :--c-card > p > a

UI

Screenshot 2024-01-03 at 12 36 29 PM

@R-Tomas-Gonzalez R-Tomas-Gonzalez added fix Fixes user-facing behavior or feature minor A feature in backward-compatible manner labels Jan 3, 2024
@R-Tomas-Gonzalez R-Tomas-Gonzalez self-assigned this Jan 3, 2024
Copy link
Member

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

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

Works 👍

Regarding how to test in demo, I have a different solution that does not edit the .hbs files, but thank you for providing a way. Expect a separate but related PR from me soon.

@wesleyboar wesleyboar merged commit 5c9f036 into main Jan 8, 2024
@wesleyboar wesleyboar deleted the task/tup-674-fix-hanging-indent branch January 8, 2024 17:30
@wesleyboar
Copy link
Member

@R-Tomas-Gonzalez, whoops. Yes, new link in demo for link that is long enough to have hanging indent would be good. (I was mixing up context of #290 and #289 when I answered.) Either you or I can add it as time allows. Lowest priority.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
fix Fixes user-facing behavior or feature minor A feature in backward-compatible manner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants