Skip to content

Commit 5505fec

Browse files
committed
WIP
1 parent 04d6aa6 commit 5505fec

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

2-ui/1-document/08-styles-and-classes/article.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Styles and classes
1+
# Estilos y clases
22

33
Before we get into JavaScript's ways of dealing with styles and classes -- here's an important rule. Hopefully it's obvious enough, but we still have to mention it.
44

@@ -285,19 +285,20 @@ But `getComputedStyle` does not give access to that color, because otherwise an
285285
JavaScript may not see the styles applied by `:visited`. And also, there's a limitation in CSS that forbids applying geometry-changing styles in `:visited`. That's to guarantee that there's no side way for an evil page to test if a link was visited and hence to break the privacy.
286286
```
287287
288-
## Summary
288+
## Resumen
289289
290-
To manage classes, there are two DOM properties:
290+
Para manejar clases, hay dos propiedades del DOM:
291291
292-
- `className` -- the string value, good to manage the whole set of classes.
293-
- `classList` -- the object with methods `add/remove/toggle/contains`, good for individual classes.
292+
- `className` -- el valor de la cadena, perfecto para manejar todo el conjunto de clases.
293+
- `classList` -- el objeto con métodos `add/remove/toggle/contains`, perfecto para clases invidivuales.
294294
295-
To change the styles:
295+
Para cambiar los estilos:
296296
297-
- The `style` property is an object with camelCased styles. Reading and writing to it has the same meaning as modifying individual properties in the `"style"` attribute. To see how to apply `important` and other rare stuff -- there's a list of methods at [MDN](mdn:api/CSSStyleDeclaration).
297+
- La propiedad `style` es un objecto con los estilos en `camelcase`.
298+
Leer y escribir tiene el mismo significado que modificar propiedades individuales en el atributo `"style"`. Para ver como aplicar `important` y otras cosas raras, hay una lista de métodos en [MDN](mdn:api/CSSStyleDeclaration).
298299
299-
- The `style.cssText` property corresponds to the whole `"style"` attribute, the full string of styles.
300+
- La propiedad `style.cssText` corresponde a todo el atributo `"style"`, la cadena completa de estilos.
300301
301-
To read the resolved styles (with respect to all classes, after all CSS is applied and final values are calculated):
302+
Para leer los estilos resueltos (con respecto a todas las clases, después de que se aplica todo el `css` se calculan los valores finales):
302303
303-
- The `getComputedStyle(elem, [pseudo])` returns the style-like object with them. Read-only.
304+
- El método `getComputedStyle(elem, [pseudo])` retorna el objeto de estilo con ellos (solo lectura).

0 commit comments

Comments
 (0)