Skip to content

why aren't the native css "text-align: start" and end used? #39

@EmeraldSnorlax

Description

@EmeraldSnorlax

the current implementation doesn't work when aligning text to the start or the end based on direction. the rules seem to conflict with each other.

what's the reasoning behind using this:

const utilities = () => ({
  '[dir="rtl"] .text-start': { 'text-align': 'right' },
  '[dir="rtl"] .text-end': { 'text-align': 'left' },
  ':not([dir="rtl"]) .text-end': { 'text-align': 'right' },
  ':not([dir="rtl"]) .text-start': { 'text-align': 'left' },
});

module.exports = utilities;

when surely this will suffice?

  '.text-start': { 'text-align': 'start' },
  '.text-end': { 'text-align': 'end' },

see these videos

Peek.2021-11-20.14-38.mp4
Peek.2021-11-20.15-00.mp4

im not sure if this is related to #25, but it seems like it might be

as a work around, ive put this in my Tailwind.postcss file:

@tailwind base;
@tailwind components;
@tailwind utilities;
  
@layer utilities {
  .text-start {
    text-align: start !important;
  }
  .text-end {
    text-align: end !important;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions