From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/css/block-size/index.html | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 files/pt-br/web/css/block-size/index.html (limited to 'files/pt-br/web/css/block-size') diff --git a/files/pt-br/web/css/block-size/index.html b/files/pt-br/web/css/block-size/index.html new file mode 100644 index 0000000000..0bab1649ec --- /dev/null +++ b/files/pt-br/web/css/block-size/index.html @@ -0,0 +1,104 @@ +--- +title: block-size +slug: Web/CSS/block-size +tags: + - Propriedade CSS + - Propriedade Lógica CSS + - Referencia + - block-size +translation_of: Web/CSS/block-size +--- +
{{CSSRef}}{{SeeCompatTable}}
+ +

A propriedade CSS block-size define o tamanho horizontal ou vertical de um elemento bloco. Corresponde à propriedade {{cssxref("width")}} ou {{cssxref("height")}}, dependendo do valor do {{cssxref("writing-mode")}}.

+ +
{{EmbedInteractiveExample("pages/css/block-size.html")}} 
+ + + +

Sintaxe

+ +
/* valores <length> */
+block-size: 300px;
+block-size: 25em;
+
+/* valores <percentage> */
+block-size: 75%;
+
+/* valores de Keyword */
+block-size: 25em border-box;
+block-size: 75% content-box;
+block-size: max-content;
+block-size: min-content;
+block-size: available;
+block-size: fit-content;
+block-size: auto;
+
+/* valores globais */
+block-size: inherit;
+block-size: initial;
+block-size: unset;
+
+ +

Se o modo de escrita está orientado verticalmente, o valor do block-size refere-se à largura do elemento; senão, refere-se à altura do elemento. Uma propriedade relacionada é {{cssxref("inline-size")}}, que define as outras dimensões do elemento.

+ +

{{cssinfo}}

+ +

Sintaxe

+ +

Valores

+ +

A propriedade block-size leva os mesmos valores que as propriedades {{cssxref("width")}} e {{cssxref("height")}}.

+ +

Sintaxe formal

+ +
{{csssyntax}}
+ +

Exemplo

+ +

HTML

+ +
<p class="exampleText">Example text</p>
+
+ +

CSS

+ +
.exampleText {
+  writing-mode: vertical-rl;
+  background-color: yellow;
+  block-size: 200px;
+}
+ +

{{EmbedLiveSample("Example")}}

+ +

Especificação

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("CSS Logical Properties", "#logical-dimension-properties", "block-size")}}{{Spec2("CSS Logical Properties")}}Definição inicial
+ +

Browser compatibility

+ + + +

{{Compat("css.properties.block-size")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf