aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordollinad <39140769+dollinad@users.noreply.github.com>2019-03-16 13:24:21 -0700
committerddodani <ddodani@sfu.ca>2019-03-21 02:04:35 -0700
commiteafd9d17ad17db30a825f238a8cbd236db5d873b (patch)
tree58d9ffa5b3d5dcf6c62ff5f2c3676534271fe95e
parent3a33f99cad1e80e1f1a3e12dd98cabd9c40aa246 (diff)
downloadservo-eafd9d17ad17db30a825f238a8cbd236db5d873b.tar.gz
servo-eafd9d17ad17db30a825f238a8cbd236db5d873b.zip
Edit Selector Implementation to be concise
Edit Selector Implementation in order to be concise. Changes involve: - Sentence rewrites - Removal of dead links - Correction of grammar and spelling Edit Style.md Edit the content under "The properties module" to make it concise . (Squashed commit)Edit Style.md #1 sytle -> style Update Style.md #1 consitency -> consistency
-rw-r--r--docs/components/style.md37
1 files changed, 16 insertions, 21 deletions
diff --git a/docs/components/style.md b/docs/components/style.md
index 43eb3d41458..161f490f935 100644
--- a/docs/components/style.md
+++ b/docs/components/style.md
@@ -1,22 +1,21 @@
# Servo's style system overview
-This needs to be filled more extensively. Meanwhile, you can also take a look to
+This needs to be filled more extensively. Meanwhile, you can also take a look at
the [style doc comments][style-doc], or the [Styling
-Overview][wiki-styling-overview] in the wiki, which is a conversation between
+Overview][wiki-styling-overview] in the wiki, a conversation between
Boris Zbarsky and Patrick Walton about how style sharing works.
<a name="selector-impl"></a>
## Selector Implementation
-The style system is generic over quite a few things, in order to be shareable
-with Servo's layout system, and with [Stylo][stylo], an ambitious project that
-aims to integrate Servo's style system into Gecko.
+In order to be sharable and compatible with [Stylo][stylo](a project that aims
+to integrate Servo's style system into Gecko), the style must be consistent.
-The main generic trait is [selectors' SelectorImpl][selector-impl], that has all
-the logic related to parsing pseudo-elements and other pseudo-classes appart
-from [tree-structural ones][tree-structural-pseudo-classes].
+The consistency is implemented in [selectors' SelectorImpl][selector-impl],
+containing the logic related to parsing pseudo-elements and other pseudo-classes
+apart from [tree-structural ones][tree-structural-pseudo-classes].
-Servo [extends][selector-impl-ext] that trait in order to allow a few more
+Servo extends the selector implementation trait in order to allow a few more
things to be shared between Stylo and Servo.
The main Servo implementation (the one that is used in regular builds) is
@@ -31,34 +30,30 @@ traits involved.
Style's [`dom` traits][style-dom-traits] (`TDocument`, `TElement`, `TNode`,
`TRestyleDamage`) are the main "wall" between layout and style.
-Layout's [`wrapper`][layout-wrapper] module is the one that makes sure that
+Layout's [`wrapper`][layout-wrapper] module makes sure that
layout traits have the required traits implemented.
<a name="stylist"></a>
## The Stylist
-The [`stylist`][stylist] structure is the one that holds all the selectors and
+The [`stylist`][stylist] structure holds all the selectors and
device characteristics for a given document.
-The stylesheets' CSS rules are converted into [`Rule`][selectors-rule]s, and
-introduced in a [`SelectorMap`][selectors-selectormap] depending on the
-pseudo-element (see [`PerPseudoElementSelectorMap`][per-pseudo-selectormap]),
+The stylesheets' CSS rules are converted into [`Rule`][selectors-rule]s.
+They are then introduced in a [`SelectorMap`][selectors-selectormap] depending
+on the pseudo-element (see [`PerPseudoElementSelectorMap`][per-pseudo-selectormap]),
stylesheet origin (see [`PerOriginSelectorMap`][per-origin-selectormap]), and
priority (see the `normal` and `important` fields in
[`PerOriginSelectorMap`][per-origin-selectormap]).
This structure is effectively created once per [pipeline][docs-pipeline], in the
-LayoutThread corresponding to that pipeline.
+corresponding LayoutThread.
<a name="properties"></a>
## The `properties` module
-The [properties module][properties-module] is a mako template where all the
-properties, computed value computation and cascading logic resides.
-
-It's a complex template with a **lot** of code, but the main function it exposes
-is the [`cascade` function][properties-cascade-fn], which performs all the
-computation.
+The [properties module][properties-module] is a mako template. Its complexity is derived
+from the code that stores properties, [`cascade` function][properties-cascade-fn] and computation logic of the returned value which is exposed in the main function.
<a name="pseudo-elements"></a>
## Pseudo-Element resolution