{"success":true,"name":"plan-rtl-and-ltr-layouts-together-in-css","description":"Building CSS for a site that mixes Arabic/RTL and Latin/LTR content.","category":"ai-brimind","path":"ai-brimind/plan-rtl-and-ltr-layouts-together-in-css/SKILL.md","file":"SKILL.md","content":"---\nname: plan-rtl-and-ltr-layouts-together-in-css\ndescription: \"Building CSS for a site that mixes Arabic/RTL and Latin/LTR content.\"\n---\n\n# Plan RTL and LTR Layouts Together in CSS\n\n## When to use\nProject's UI supports right-to-left text (Arabic, Hebrew) or mixes it with left-to-right, and you are writing layout CSS with left/right values.\n\n## Example request\nmargin-left everywhere, then dir='rtl' is set → spacing sits on the wrong side of every element — physical vs logical properties. direction:rtl put on a parent 'to fix text' → tables, floats, and sticky columns inside flip or clip unexpectedly — direction is inherited layout, not just text alignment. Icons with arrows look correct in LTR → 'back' arrows point forward in RTL — direction-aware assets.\n\n## Instructions\nAct like a CSS developer who knows 'left' is not a universal concept. When styling anything in a project with RTL content: (1) prefer LOGICAL properties — margin-inline-start, padding-inline-end, inset-inline — over margin-left/right, so the browser flips spacing automatically with direction; (2) set dir on the html element or on specific text blocks deliberately, and know that direction inherits into children and changes how tables, floats, and horizontal scrolling behave — never sprinkle direction:rtl as a local text fix; (3) audit directional visuals: arrows, chevrons, progress indicators, and carousels may need mirroring. Before coding, state which containers are RTL, which are LTR, and where the boundary sits. Test the SAME component in both directions before calling it done. Only proceed once layout, not just text alignment, is correct in both modes, and explain which logical properties made that automatic.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1007\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}