From f3f9ee7c3e4994ca5cb3a1579dfe7dc08c263882 Mon Sep 17 00:00:00 2001
From: Abdullah Ammar <50788123+abdmmar@users.noreply.github.com>
Date: Sat, 2 Oct 2021 16:07:27 +0700
Subject: [PATCH 1/2] Translate to Bahasa Indonesia
---
.../6-shadow-dom-style/article.md | 116 +++++++++---------
1 file changed, 56 insertions(+), 60 deletions(-)
diff --git a/8-web-components/6-shadow-dom-style/article.md b/8-web-components/6-shadow-dom-style/article.md
index 98e246a7f..bab792c00 100644
--- a/8-web-components/6-shadow-dom-style/article.md
+++ b/8-web-components/6-shadow-dom-style/article.md
@@ -1,16 +1,16 @@
-# Shadow DOM styling
+# Gaya shadow DOM
-Shadow DOM may include both `
```
-...Then the `` would be without padding.
+...Maka `` tidak akan memiliki padding.
-It's very convenient, as we can setup "default" component styles in its `:host` rule, and then easily override them in the document.
-
-The exception is when a local property is labelled `!important`, for such properties, local styles take precedence.
+Ini sangat memudahkan, karena kita dapat mengatur gaya komponen "default" dalam aturan `:host`-nya, dan kemudian dengan mudah menimpanya dalam dokumen.
+Pengecualiannya adalah ketika properti lokal diberi label `!important`, untuk properti seperti itu, gaya lokal diutamakan.
## :host(selector)
-Same as `:host`, but applied only if the shadow host matches the `selector`.
+Sama seperti `:host`, tetapi hanya diterapkan jika shadow host cocok dengan `selector`.
-For example, we'd like to center the `` only if it has `centered` attribute:
+Sebagai contoh, kita ingin membuat `` berada di tengah jika hanya memiliki atribut `centered`:
```html run autorun="no-epub" untrusted height=80
@@ -109,17 +108,17 @@ customElements.define('custom-dialog', class extends HTMLElement {
```
-Now the additional centering styles are only applied to the first dialog: ``.
+Sekarang gaya penengah tambahan hanya diterapkan pada dialog pertama: ``.
-To summarize, we can use `:host`-family of selectors to style the main element of the component. These styles (unless `!important`) can be overridden by the document.
+Ringkasnya, kita dapat menggunakan *selector* `:host` untuk menata elemen utama komponen. Gaya ini (kecuali `!important`) dapat ditimpa oleh dokumen.
-## Styling slotted content
+## Menata gaya konten yang ber-slot
-Now let's consider the situation with slots.
+Sekarang mari kita pertimbangkan situasi ketika menggunakan slot.
-Slotted elements come from light DOM, so they use document styles. Local styles do not affect slotted content.
+Elemen yang ber-slot berasal dari light DOM, jadi mereka menggunakan gaya dokumen. Gaya lokal tidak memengaruhi konten yang menggunakan slot.
-In the example below, slotted `` is bold, as per document style, but does not take `background` from the local style:
+Pada contoh dibawah, `` yang berada di slot dicetak tebal, sesuai dengan gaya dokumen, tetapi tidak mengambil `background` dari gaya lokal:
```html run autorun="no-epub" untrusted height=80
Name:
Birthday:
```
-Then, we can declare this property in the outer document for ``:
+Kemudian, kita dapat mendeklarasikan properti ini di dokumen luar untuk ``:
```css
user-card {
@@ -254,9 +252,9 @@ user-card {
}
```
-Custom CSS properties pierce through shadow DOM, they are visible everywhere, so the inner `.field` rule will make use of it.
+Properti kustom CSS menembus shadow DOM, artinya mereka bisa dilihat di mana-mana, sehingga aturan `.field` yang berada di dalam akan memanfaatkannya.
-Here's the full example:
+Berikut contoh lengkapnya:
```html run autorun="no-epub" untrusted height=80