Skip to content

Commit 164020d

Browse files
Translate style.md to Portuguese (#1025)
* Translate `style.md` to Portuguese * Update style.md remove indent spaces --------- Co-authored-by: Jhon Mike <[email protected]>
1 parent e017bc7 commit 164020d

File tree

1 file changed

+25
-27
lines changed
  • src/content/reference/react-dom/components

1 file changed

+25
-27
lines changed

src/content/reference/react-dom/components/style.md

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ style: "<style>"
44

55
<Intro>
66

7-
The [built-in browser `<style>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) lets you add inline CSS stylesheets to your document.
7+
O [componente `<style>` nativo do navegador](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style) permite que você adicione folhas de estilo CSS embutidas no seu documento.
88

99
```js
1010
<style>{` p { color: red; } `}</style>
@@ -16,58 +16,56 @@ The [built-in browser `<style>` component](https://developer.mozilla.org/en-US/d
1616

1717
---
1818

19-
## Reference {/*reference*/}
19+
## Referência {/*reference*/}
2020

2121
### `<style>` {/*style*/}
2222

23-
To add inline styles to your document, render the [built-in browser `<style>` component](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style). You can render `<style>` from any component and React will [in certain cases](#special-rendering-behavior) place the corresponding DOM element in the document head and de-duplicate identical styles.
23+
Para adicionar estilos embutidos ao seu documento, renderize o [componente `<style>` nativo do navegador](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style). Você pode renderizar `<style>` de qualquer componente e o React [em certos casos](#special-rendering-behavior) colocará o elemento DOM correspondente no `<head>` do documento e fará a desduplicação de estilos idênticos.
2424

2525
```js
2626
<style>{` p { color: red; } `}</style>
2727
```
2828

29-
[See more examples below.](#usage)
29+
[Veja mais exemplos abaixo.](#usage)
3030

3131
#### Props {/*props*/}
3232

33-
`<style>` supports all [common element props.](/reference/react-dom/components/common#props)
33+
`<style>` suporta todas as [props de elementos comuns.](/reference/react-dom/components/common#props)
3434

35-
* `children`: a string, required. The contents of the stylesheet.
36-
* `precedence`: a string. Tells React where to rank the `<style>` DOM node relative to others in the document `<head>`, which determines which stylesheet can override the other. React will infer that precedence values it discovers first are "lower" and precedence values it discovers later are "higher". Many style systems can work fine using a single precedence value because style rules are atomic. Stylesheets with the same precedence go together whether they are `<link>` or inline `<style>` tags or loaded using [`preinit`](/reference/react-dom/preinit) functions.
37-
* `href`: a string. Allows React to [de-duplicate styles](#special-rendering-behavior) that have the same `href`.
38-
* `media`: a string. Restricts the stylesheet to a certain [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries).
39-
* `nonce`: a string. A cryptographic [nonce to allow the resource](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) when using a strict Content Security Policy.
40-
* `title`: a string. Specifies the name of an [alternative stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets).
35+
* `children`: uma string, obrigatório. O conteúdo da folha de estilo.
36+
* `precedence`: uma string. Diz ao React onde classificar o nó `<style>` DOM em relação a outros no `<head>` do documento, o que determina qual folha de estilo pode substituir a outra. React inferirá que valores de precedência que ele descobrir primeiro são "menores" e valores de precedência que ele descobrir mais tarde são "maiores". Muitos sistemas de estilo podem funcionar bem usando um único valor de precedência porque as regras de estilo são atômicas. Folhas de estilo com a mesma precedência vão juntas, sejam elas tags `<link>` ou `<style>` embutidas ou carregadas usando funções [`preinit`](/reference/react-dom/preinit).
37+
* `href`: uma string. Permite que o React [faça a desduplicação de estilos](#special-rendering-behavior) que têm o mesmo `href`.
38+
* `media`: uma string. Restringe a folha de estilo a uma determinada [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries).
39+
* `nonce`: uma string. Um [nonce](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) criptográfico para permitir o recurso ao usar uma Política de Segurança de Conteúdo estrita.
40+
* `title`: uma string. Especifica o nome de uma [folha de estilo alternativa](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets).
4141

42-
Props that are **not recommended** for use with React:
42+
Props que **não são recomendadas** para uso com o React:
4343

44-
* `blocking`: a string. If set to `"render"`, instructs the browser not to render the page until the stylesheet is loaded. React provides more fine-grained control using Suspense.
44+
* `blocking`: uma string. Se definido como `"render"`, instrui o navegador a não renderizar a página até que a folha de estilo seja carregada. O React fornece um controle mais preciso usando o Suspense.
4545

46-
#### Special rendering behavior {/*special-rendering-behavior*/}
46+
#### Comportamento especial de renderização {/*special-rendering-behavior*/}
4747

48-
React can move `<style>` components to the document's `<head>`, de-duplicate identical stylesheets, and [suspend](/reference/react/Suspense) while the stylesheet is loading.
48+
O React pode mover componentes `<style>` para o `<head>` do documento, desduplicar folhas de estilo idênticas e [suspender](/reference/react/Suspense) enquanto a folha de estilo está carregando.
4949

50-
To opt into this behavior, provide the `href` and `precedence` props. React will de-duplicate styles if they have the same `href`. The precedence prop tells React where to rank the `<style>` DOM node relative to others in the document `<head>`, which determines which stylesheet can override the other.
50+
Para optar por esse comportamento, forneça as props `href` e `precedence`. O React fará a desduplicação de estilos se eles tiverem o mesmo `href`. A prop precedence diz ao React onde classificar o nó `<style>` DOM em relação a outros no `<head>` do documento, o que determina qual folha de estilo pode substituir a outra.
5151

52-
This special treatment comes with two caveats:
52+
Este tratamento especial vem com duas ressalvas:
5353

54-
* React will ignore changes to props after the style has been rendered. (React will issue a warning in development if this happens.)
55-
* React will drop all extraneous props when using the `precedence` prop (beyond `href` and `precedence`).
56-
* React may leave the style in the DOM even after the component that rendered it has been unmounted.
54+
* O React ignorará as alterações nas propriedades após a renderização do estilo. (O React emitirá um aviso no desenvolvimento se isso acontecer.)
55+
* O React removerá todas as propriedades estranhas ao usar a propriedade `precedence` (além de `href` e `precedence`).
56+
* O React pode deixar o estilo no DOM mesmo após o componente que o renderizou ter sido desmontado.
5757

5858
---
5959

60-
## Usage {/*usage*/}
60+
## Uso {/*usage*/}
6161

62-
### Rendering an inline CSS stylesheet {/*rendering-an-inline-css-stylesheet*/}
62+
### Renderizando uma folha de estilo CSS embutida {/*rendering-an-inline-css-stylesheet*/}
6363

64-
If a component depends on certain CSS styles in order to be displayed correctly, you can render an inline stylesheet within the component.
64+
Se um componente depende de certos estilos CSS para ser exibido corretamente, você pode renderizar uma folha de estilo embutida dentro do componente.
6565

66-
The `href` prop should uniquely identify the stylesheet, because React will de-duplicate stylesheets that have the same `href`.
67-
If you supply a `precedence` prop, React will reorder inline stylesheets based on the order these values appear in the component tree.
66+
A prop `href` deve identificar de forma exclusiva a folha de estilo, porque o React fará a desduplicação de folhas de estilo que têm o mesmo `href`. Se você fornecer uma prop `precedence`, o React reordenará as folhas de estilo embutidas com base na ordem em que esses valores aparecem na árvore de componentes.
6867

69-
Inline stylesheets will not trigger Suspense boundaries while they're loading.
70-
Even if they load async resources like fonts or images.
68+
As folhas de estilo embutidas não acionarão limites do Suspense enquanto estiverem carregando. Mesmo que carreguem recursos assíncronos, como fontes ou imagens.
7169

7270
<SandpackWithHTMLOutput>
7371

0 commit comments

Comments
 (0)