Skip to content

ChatGPT Table fix by DiNaSoR

Details

AuthorDiNaSoR

LicenseFree

CategoryChatgpt

Created

Updated

Code size2.0 kB

Code checksum925acafe

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

fixing tables alignment in arabic

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         ChatGPT Table fix
@version      20250413.13.18
@namespace    https://userstyles.world/user/DragonArab
@description  fixing tables alignment in arabic
@author       DragonArab
@license      Free
==/UserStyle== */

@-moz-document domain("chatgpt.com") {
/* == Full Stylus Code == */

/* --- Part 1: Fix the centering of the container div --- */

/* Target the specific div using its unique combination of classes */
/* Make sure to escape special characters like [, ], %, ! */
div.pointer-events-none.relative.left-\[50\%\]\!.flex.w-\[100cqw\].translate-x-\[-50\%\].justify-center {

    /* Reset position from 'relative' back to default 'static' */
    position: static !important;

    /* Reset left positioning from '50%' back to default 'auto' */
    /* Needs !important to override the original 'left-[50%]!' */
    left: auto !important;

    /* Reset width from '100cqw' back to default 'auto' */
    width: auto !important;

    /* Reset translation - use 'none' for both translate and transform */
    /* Use !important for safety to ensure override */
    --tw-translate-x: 0 !important; /* Reset the Tailwind variable */
    translate: none !important; /* Reset the modern translate property */
    transform: none !important; /* Reset the older transform property as a fallback */
}

/* --- Part 2: Align Arabic text inside the table within that div --- */

/* Target table header (th) and table data (td) cells inside the specific div */
div.pointer-events-none.relative.left-\[50\%\]\!.flex.w-\[100cqw\].translate-x-\[-50\%\].justify-center table th,
div.pointer-events-none.relative.left-\[50\%\]\!.flex.w-\[100cqw\].translate-x-\[-50\%\].justify-center table td {

    /* Align text to the right */
    text-align: right !important;

    /* Ensure the text direction is right-to-left */
    direction: rtl !important;
}

/* Optional: You could still include the global RTL rule if needed */
/*
:where(:lang(ar), [dir="rtl"]) {
   text-align: right !important;
   direction: rtl !important;
}
*/
}

Reviews

No reviews yet.