Logical properties are CSS properties that define element sizing, positioning, and spacing relative to the document's writing mode (e.g., horizontal-tb, vertical-rl) rather than physical directions like top, right, bottom, or left. They use flow-relative axes: inline (the text flow direction) and block (the perpendicular stacking direction), allowing a single stylesheet to adapt seamlessly across languages.
Glossary
Logical Properties

What are Logical Properties?
Logical properties define layout direction relative to the writing mode rather than physical screen dimensions, enabling semantically correct internationalization for AI models processing multilingual content.
For AI parsers and search engines, logical properties provide critical semantic interoperability by ensuring that border-inline-start and margin-block-end maintain their intended structural meaning regardless of whether the content is rendered in English, Arabic, or Japanese. This flow-relative approach eliminates the ambiguity of physical properties, enabling models to accurately interpret content hierarchy and spatial relationships in multilingual documents.
Core Logical Property Mappings
A reference of the fundamental CSS logical properties that replace physical directional declarations, enabling layouts that automatically adapt to the document's writing mode for true internationalization.
Inline vs. Block Axis
The foundational concept of logical properties is the abstraction of the inline axis (the direction text flows) and the block axis (the direction blocks stack).
- Horizontal Writing Mode (e.g., English): Inline is the X-axis (left-to-right), Block is the Y-axis (top-to-bottom).
- Vertical Writing Mode (e.g., Japanese): Inline is the Y-axis (top-to-bottom), Block is the X-axis (right-to-left).
This abstraction allows a single CSS rule to correctly position an element's padding, margin, or border regardless of the language direction.
Border & Padding Mappings
Physical properties like padding-left and border-right are replaced with logical equivalents that map to the flow of text, not the physical screen.
padding-inline-startreplacespadding-leftin LTR andpadding-rightin RTL.padding-block-endreplacespadding-bottomin horizontal modes andpadding-leftin vertical modes.- Shorthand:
padding-inlinesets both start and end inline padding.
This is critical for maintaining consistent internal spacing in components rendered in multiple languages.
Margin Logical Shorthands
Margins follow the same inline/block abstraction to control spacing between elements in a flow-relative way.
margin-inline-start: The margin at the beginning of the text line.margin-block-end: The margin after the block element, creating vertical space in English or horizontal space in vertical Japanese.margin-inline: auto: A powerful pattern for centering a block-level element horizontally in a horizontal writing mode, which adapts to vertical centering in a vertical mode.
Dimension & Positioning
Logical properties extend to element sizing and absolute positioning, decoupling layout from physical coordinates.
inline-sizereplaceswidth;block-sizereplacesheight.inset-inline-startreplacesleftin LTR andrightin RTL for absolutely positioned elements.inset-block-endreplacesbottomin horizontal modes.
Using inset-inline-start: 0 ensures a sidebar is anchored to the correct edge based on the writing direction.
Text Alignment & Float
Logical values for text alignment and the legacy float property provide flow-relative control over content flow.
text-align: startandtext-align: endalign text to the beginning or end of the inline axis, respecting RTL scripts.float: inline-startfloats an element to the start edge of its container, replacingfloat: leftfor multilingual layouts.clear: inline-endensures an element clears past floated elements on the end edge.
Border Radius Flow-Relative Mapping
Even border radii can be mapped logically to ensure a button's visual styling remains semantically correct when the writing mode changes.
border-start-start-radius: The corner at the start of the inline axis and the start of the block axis (e.g., top-left in English LTR).border-end-end-radius: The opposite corner.
This granular control is essential for UI components that use directional cutouts or tabs that must mirror correctly in RTL layouts.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Clear, technical answers to the most common questions about CSS logical properties, writing modes, and how they enable semantically correct internationalization for AI-driven content parsing.
CSS logical properties are a set of CSS properties that define layout direction relative to the writing mode of the document rather than the physical dimensions of the screen. Instead of using physical properties like margin-left, padding-right, or border-top, logical properties use flow-relative terms such as margin-inline-start, padding-block-end, and border-inline. The browser automatically maps these logical values to the correct physical side based on the element's computed writing-mode, direction, and text-orientation. For example, margin-inline-start maps to margin-left in a left-to-right horizontal writing mode (like English) but maps to margin-right in a right-to-left mode (like Arabic) and to margin-top in a vertical writing mode (like traditional Japanese). This abstraction allows a single stylesheet to correctly position elements across multiple languages and writing systems without requiring separate, language-specific overrides. For AI parsers processing multilingual content, logical properties provide a programmatically deterministic layout model that accurately reflects the intended reading order and content flow, enabling more precise semantic extraction and content hierarchy analysis regardless of the target language's directionality.
Related Terms
Core concepts that define how CSS logical properties interact with writing modes, document flow, and AI-driven content parsing for multilingual semantic extraction.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us