aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/css/inline-size/index.html
blob: 0d8dcb62a1e73994651c6b2753f4717441982fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: inline-size
slug: Web/CSS/inline-size
translation_of: Web/CSS/inline-size
---
<div>{{CSSRef}}{{SeeCompatTable}}</div>

<p>A propriedade do <a href="/en-US/docs/Web/CSS" title="CSS">CSS</a> <strong><code>inline-size</code></strong> define o tamanho horizontal e vertical de um elemento bloco. Ele é correspondente a cada propriedade {{cssxref("width")}} ou a {{cssxref("height")}}, dependendo do valor de {{cssxref("writing-mode")}}.</p>

<pre class="brush:css no-line-numbers">/* &lt;length&gt; values */
inline-size: 300px;
inline-size: 25em;

/* &lt;percentage&gt; values */
inline-size: 75%;

/* Keyword values */
inline-size: 25em border-box;
inline-size: 75% content-box;
inline-size: max-content;
inline-size: min-content;
inline-size: available;
inline-size: fit-content;
inline-size: auto;

/* Global values */
inline-size: inherit;
inline-size: initial;
inline-size: unset;
</pre>

<p>Se o writing mode é orientado verticalmente, o valor de <code>inline-size</code> relaciona a altura do elemento; ao contrário, está relacionado a largura do elemento. A propriedade relacionada é a {{cssxref("block-size")}}, no qual define a outra dimensão do elemento.</p>

<p>{{cssinfo}}</p>

<h2 id="Sintaxe">Sintaxe</h2>

<h3 id="Valores">Valores</h3>

<p>A propriedade <code>inline-size</code> aproveita os mesmos valores que as propriedades {{cssxref("width")}} e {{cssxref("height")}}.</p>

<h3 id="Sintaxe_formal">Sintaxe formal</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Exemplo">Exemplo</h2>

<h3 id="HTML">HTML</h3>

<pre class="brush: html">&lt;p class="exampleText"&gt;Texto de Exemplo&lt;/p&gt;
</pre>

<h3 id="CSS">CSS</h3>

<pre class="brush: css">.exampleText{
  writing-mode: vertical-rl;
  background-color: yellow;
  inline-size: 110px;
}</pre>

<p>{{EmbedLiveSample("Example")}}</p>

<h2 id="Especificações">Especificações</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificação</th>
   <th scope="col">Status</th>
   <th scope="col">Comentário</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS Logical Properties", "#logical-dimension-properties", "inline-size")}}</td>
   <td>{{Spec2("CSS Logical Properties")}}</td>
   <td>Definição Inicial</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilidade_com_Navegador">Compatibilidade com Navegador</h2>

<div class="hidden">A tabela de compatibilidade desta página é gerada por dados estruturados. Se você gostaria de contribuir com esses dados, por favor verifique <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> e envie nos um pull request.</div>

<p>{{Compat("css.properties.inline-size")}}</p>

<h2 id="Veja_também">Veja também</h2>

<ul>
 <li>As propriedades físicas mapeadas: {{cssxref("width")}} e {{cssxref("height")}}</li>
 <li>{{cssxref("writing-mode")}}</li>
</ul>