No estándar
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Resumen
La propiedad CSS -webkit-border-before es una propiedad que permite configurar los valores de la propiedad borde para el bloque lógico de inicio en un sólo sitio de la hoja de estilos. -webkit-border-before se puede usar para establecer los valores para más de uno de: -webkit-border-before-width, -webkit-border-before-style, y -webkit-border-before-color. Se mapea a un borde físico dependiendo del modo de escritura del elemento, la direccionalidad y la orientación del texto. Se corresonde con la propiedad border-top, border-right, border-bottom, o border-left dependiendo de los valores definidos en writing-mode, direction, y text-orientation.
Se relaciona con -webkit-border-after, -webkit-border-start, y -webkit-border-end, que definen los otros bordes del elemento.
Esta propiedad se prevee que será incluida en el estándar como border-block-start.
| Valor inicial | as each of the properties of the shorthand:
|
|---|---|
| Applies to | all elements |
| Heredable | yes |
| Percentages | as each of the properties of the shorthand:
|
| Media | visual |
| Valor calculado | as each of the properties of the shorthand:
|
| Animatable | no |
| Canonical order | el orden único no-ambigüo definido por la gramática formal |
Síntaxis
/* Valores para el borde */ -webkit-border-before: 1px; -webkit-border-before: 2px dotted; -webkit-border-before: medium dashed blue; /* Valores globales */ -webkit-border-before: inherit; -webkit-border-before: initial; -webkit-border-before: unset;
Valores
Uno o más de los siguiente valores, dando igual el orden en el que se especifiquen:
<'border-width'>- Ver
border-width <'border-style'>- Ver
border-style <'color'>- Ver
color
Formal syntax
<'border-width'> || <'border-style'> || <'color'>where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where
<rgb()> = rgb( <rgb-component>#{3} )
<rgba()> = rgba( <rgb-component>#{3} , <alpha-value> )
<hsl()> = hsl( <hue>, <percentage>, <percentage> )
<hsla()> = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<named-color> = <ident>
<deprecated-system-color> = ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowTextwhere
<rgb-component> = <integer> | <percentage>
<alpha-value> = <number>
<hue> = <number>
Ejemplo
Contenido HTML
<div> <p class="exampleText">Texto de ejemplo</p> </div>
Contenido CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-rl;
-webkit-border-before: 5px dashed blue;
}
Especificaciones
No es parte de ninguna especificación aunque está relacionada con la propiedad border-block-start.
Compatibilidad con los distintos navegadores.
| Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Soporte básico | (Yes) | No support | No support | (Yes) | ? |
| Característica | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Soporte básico | ? | No support | No support | ? | ? |
Ver además
border-block-start- Las propiedad físicas mapeadas:
border-top,border-right,border-bottom, yborder-left writing-mode,direction,text-orientation