1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How in tailwindcss make modal dialog when page has horizontal scrolling?

Discussion in 'CSS' started by mstdmstd, Apr 23, 2021.

  1. #1
    Hello,
    Basing on tailwindcss 2 modal example https://alpinetoolbox.com/examples/modal
    I make modal dialog with setting max-h-screen class, like


    <div class="overflow-auto" role="dialog" style="background-color: rgba(0,0,0,0.5)" x-show="showModal"
    :class="{ 'absolute inset-0 z-50 flex items-center justify-center': showModal }"
    @keydown.escape.window="showModal = false"
    >
    <!--Dialog-->
    <div
    class="flex flex-col sm:h-4/5 md:h-4/6 max-h-screen justify-between rounded shadow-lg py-4 text-left px-6 modal-container"
    x-show="showModal" @click.away="showModal = false" x-transition:enter="ease-out duration-300"
    x-transition:enter-start="opacity-0 scale-90" x-transition:enter-end="opacity-100 scale-100"
    x-transition:leave="ease-in duration-300" x-transition:leave-start="opacity-100 scale-100"
    x-transition:leave-end="opacity-0 scale-90">
    
    HTML:

    and it works ok, untill page has no horizontal scrolling.

    If page has horizontal scrolling - then only part of the page is with modal and space below is
    empty and this makes page

    I also tried to use max-h-full instead of max-h-screen, but no effect.

    How can I made it ?

    Thanks!
     
    mstdmstd, Apr 23, 2021 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Given that their garbage shit-show of pissing on the markup with presentational classes, driving everything back to the WORST of HTML 3.2 practices, also pisses on the markup with inlined style, and scripttardery for things that don't even NEED JavaScript in the first flipping place...

    My advice is to kick the mind-numbingly DIPSHIT TRASH that is Tailwind in the trash. The ONLY thing you can learn from this f***wittery is how NOT to build a website. Anyone telling you otherwise isn't qualified to open their freaking trap on the subject.

    Quite literally it would be faster, simpler, and easier to throw the ENTIRE mess you're dealing with in the trash and to start over with clean semantic markup letting PROPER use of CSS (and not the dipshit presentational classes) do the heavy lifting.

    Would you like to know more?

    https://medium.com/codex/why-presentational-classes-for-html-css-are-ignorant-garbage-bcfdb02ec397

    https://medium.com/codex/tailwind-the-new-king-6a9908097da8

    https://medium.com/codex/more-tailwind-junk-the-starter-kit-6bf4a77a50f4

    I wouldn't trust the asshat clowns who created and maintain Tailwind to tie their own shoes, much less tell others how to make a website. You've been saddled up and taken for a ride. Suckered. Bamboozled even.

    As evidenced by the shit-show of made up attributes and pointless classes on your two DIV.
     
    deathshadow, Apr 24, 2021 IP