padding-inline-start

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

Experimental: Esta es una tecnología experimental
Comprueba la Tabla de compabilidad de navegadores cuidadosamente antes de usarla en producción.

La propiedad de CSS padding-inline-start define el relleno de inicio lógico en línea de un elemento, que se asigna a un relleno físico en función del modo de escritura, la direccionalidad y la orientación del texto del elemento. Corresponde a las propiedades padding-top, padding-right, padding-bottom, or padding-left dependiendo de los valores definidos por writing-mode, direction, y text-orientation.

Esto se relaciona con padding-block-start, padding-block-end, y padding-inline-end, que define los rellenos de los otros elementos.

Pruébalo

Sintaxis

css
/* <length> values */
padding-inline-start: 10px; /* An absolute length */
padding-inline-start: 1em; /* A length relative to the text size */

/* <percentage> value */
padding-inline-start: 5%; /* A padding relative to the block container's width */

/* Global values */
padding-inline-start: inherit;
padding-inline-start: initial;
padding-inline-start: unset;
Valor inicial0
Applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column
Heredableno
Percentageslogical-width of containing block
Valor calculadoas <length>
Animation typea length

Valores

La propiedad padding-inline-start toma los mismos valores de la propiedad padding-left.

Sintaxis formal

padding-inline-start = 
<'padding-top'>

<padding-top> =
<length-percentage [0,∞]>

<length-percentage> =
<length> |
<percentage>

Ejemplo

Contenido HTML

html
<div>
  <p class="exampleText">Example text</p>
</div>

Contenido CSS

css
div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-lr;
  padding-inline-start: 20px;
  background-color: #c8c800;
}

Especificaciones

Specification
CSS Logical Properties and Values Level 1
# padding-properties

Compatibilidad con navegadores

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
padding-inline-start

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Uses a non-standard name.
Has more compatibility info.

Mira también