Skip to content

Commit 0c63757

Browse files
committed
Merge pull request gss#35 from oslego/fix-copy
Fix typos and clarify statements.
2 parents 0e1f3cf + 30ddf79 commit 0c63757

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

guides/_posts/2014-01-11-ifelse.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@
66
layout: post
77
---
88

9-
The age of "Responsive Web Design" is upon us and it's mandate for designs that elegantly adapt to the user's viewing context has made
9+
The age of "Responsive Web Design" is upon us and its mandate for designs that elegantly adapt to the user's viewing context has made
1010
web dev "hard, really hard, actually" as Mr Jeff Croft [lamented](http://jeffcroft.com/blog/2012/mar/02/implementing-responsive-design/).
1111
Conceptualizing Responsive layouts is difficult enough, but implementing such layouts with
1212
[CSS Media Queries](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries) is an awkward affair
13-
because as Ian Taylor [illuminated](http://ianstormtaylor.com/media-queries-are-a-hack/), Media Queries are a hack.
13+
because, as Ian Taylor [illuminated](http://ianstormtaylor.com/media-queries-are-a-hack/), Media Queries are a hack.
1414

1515
## Element Queries
1616

1717
Media Queries allow layouts to adapt to the size of the viewport, but if you want to adapt to anything else, tough luck.
1818
W3C members have received an [onslaught](http://www.xanthir.com/b4PR0) of requests for "Element Queries" - because web designers
1919
are desperate to achieve higher levels of adaptiveness with their layouts. The idea with Element Queries is simple - individual elements
2020
can be responsive to their own size, which would allow for richer designs & more modular Style Sheets. W3C have
21-
[start discussion](http://responsiveimagescg.github.io/eq-usecases/) about element queries but as this point they still don't have official
22-
endorsement of element queries.
21+
[started a discussion](http://responsiveimagescg.github.io/eq-usecases/) about element queries but at this point they still don't have official endorsement of element queries.
2322

2423
Yet, even with the hypothetical Element Query, elements could only be adaptive to their size. Why not allow elements to be adaptive to any property
2524
like `col-count` or even to a custom variable?
@@ -30,10 +29,10 @@
3029
much desired Element Query, that allow CSS rules to be adaptive to any arbitrary property or custom constraint variable.
3130
<a href="http://codepen.io/thegridgssdocs/pen/emEaQR" target="_blank">Live example.</a>
3231

33-
Instead of continuing the tradition of the Query types; `min-width`, `max-width`, `min-height` & `max-height`; for every
32+
Instead of continuing the tradition of the Query types (`min-width`, `max-width`, `min-height` & `max-height`) for every
3433
available CSS property, `@if` `@else` directives use the conditional operators: `<`, `<=`, `>`, `>=`, `!=`, `==`, `or`, and `and`.
3534

36-
As an example, if we wanted a set of CSS rules to kick when the screen is less than 960px:
35+
For example, if we want a set of CSS rules to kick-in when the viewport is narrower than 960px:
3736

3837
{% highlight css %}
3938

@@ -72,7 +71,7 @@
7271
constrained by the @if block, otherwise by the @else block.
7372

7473
### Constraint evaluation within conditionals
75-
In order to determine if a conditional holds, GSS needs to evaluate every constraints outside of the conditional before evaluating if it is met.
74+
In order to determine if a conditional holds, GSS needs to evaluate every constraint outside of the conditional before evaluating if it is met.
7675
This includes constraints appearing after the conditional's declaration.
7776

7877
As explained in the [CCSS guide](/guides/ccss), the constraint declaration order can affect the

guides/_posts/2015-02-05-layout.html

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<a name="position"></a>
1010
## Positioning
1111

12-
Elements are positioned relative to the scope element, so its top left corner is considered a (0, 0) point. GSS initialized upon `document`, `<html>`, `<body>` or `<head>` position against the `<html>` element. Global properties like `$left`, `$right`, `$scroll-top` and `$bottom` point to respective properties of `::window`.
12+
Elements are positioned relative to the scope element, so its top-left corner is considered a (0, 0) point. GSS initialized upon `document`, `<html>`, `<body>` or `<head>` position against the `<html>` element. Global properties like `$left`, `$right`, `$scroll-top` and `$bottom` point to respective properties of `::window`.
1313

1414
Cassowary is a general purpose solver, so it does not make any assumptions about the positioning or even geometry. If there's nothing that is bound to absolute values like zero or edges of the screen, the whole layout can be solved to be positioned off-screen. Negative `top` and `left` values is a common gotcha in *underconstrained* systems.
1515

@@ -91,7 +91,7 @@
9191
{% endhighlight %}
9292

9393
Position the `#someElm` top-left corner to be at 100px from the top-left of the page.
94-
Same thing for `#otherElm` excepts its the top-right corner that's been position 200px
94+
Same thing for `#otherElm` except it's the top-right corner that's been positioned 200px
9595
from the top-left of the page.
9696

9797
### bottom-left, bottom-right
@@ -102,7 +102,7 @@
102102
{% endhighlight %}
103103

104104
Position the `#someElm` bottom-left corner to be at 100px from the top-left of the page.
105-
Same thing for `#otherElm`, excepts its the bottom-right corner that's been position 200px
105+
Same thing for `#otherElm`, except it's the bottom-right corner that's been positioned 200px
106106
from the top-left of the page.
107107

108108
### center-x, cx
@@ -118,7 +118,7 @@
118118

119119
{% endhighlight %}
120120

121-
Horizontally place the horizontal center of the element at 100px from the left of the page.
121+
Set the horizontal coordinate for the center of the element at 100px from the left of the page.
122122

123123
### center-y, cy
124124

@@ -134,7 +134,7 @@
134134

135135
{% endhighlight %}
136136

137-
Place the vertical center of the element 100px from the top of the page.
137+
Set the vertical coordinate for center of the element at 100px from the top of the page.
138138

139139
### Center
140140

@@ -188,11 +188,11 @@
188188

189189
By employing CSS to lay out big chunks of layout, we make each section solution independent. This leads to smaller individual constraint graphs and better overall performance.
190190

191-
With the `position: relative` declared in the `style` attribute, GSS will solve independently each sections which
192-
should results in better performance. <a href="http://codepen.io/thegridgssdocs/pen/pvwaNN" target="_blank">Live example.</a>
191+
With the `position: relative` declared in the `style` attribute, GSS will solve independently each section which
192+
should result in better performance. <a href="http://codepen.io/thegridgssdocs/pen/pvwaNN" target="_blank">Live example.</a>
193193

194194
## Dimensions
195-
GSS provides property to constrain the dimension of an element. We've already saw the `width` and `height`.
195+
GSS provides a property to constrain the dimension of an element. We already saw the `width` and `height` properties.
196196
GSS provides syntax sugar called 2d properties to constrain both height and width of an element as a single property.
197197

198198
{% highlight css %}
@@ -205,34 +205,34 @@
205205

206206
## Intrinsic values
207207

208-
Positioning elements with `top` and `left` properties doesn't require GSS to know the dimensions of that elements. But `right` and `bottom` properties need to know about `width` and `height` of the element respectively. Properly constrained system will provide those values indirectly with no regard to elements contents.
208+
Positioning elements with `top` and `left` properties doesn't require GSS to know the dimensions of those elements. But `right` and `bottom` properties need to know about `width` and `height` of the element respectively. Properly constrained systems will provide those values indirectly with no regard to an element's contents.
209209

210-
However it's often desirable to know the computed dimensions of specific elements which GSS has no control over - be it text, images or blocks styled with CSS. Measurements provide dynamic "islands" to the layout, which can be automatically recomputed, whenever measured things are updated from the outside. It also may act as a feedback to the solver, disallowing content to shrink too much or helping to decide if things fit.
210+
However, it's often desirable to know the computed dimensions of specific elements which GSS has no control over - be it text, images or blocks styled with CSS. Measurements provide dynamic "islands" to the layout, which can be automatically recomputed, whenever measured things are updated from the outside. It also may act as a feedback to the solver, disallowing content to shrink too much or helping to decide if things fit.
211211

212-
Prepending property with `intrinsic-` or `computed-` prefix makes GSS measure the values.
212+
Prefixing a property with `intrinsic-` or `computed-` prefix makes GSS measure the value.
213213

214-
Using `intrinsic` property is used on the element, makes the property to be *read-only*. Declaration of `intrinsic-width` [propertywill ensure that `width` style is never applied to that element. This allows dimensions to change and update naturally. Otherwise, the width would be computed and applied only the first time, making it static.
214+
Prefixing a property with `intrinsic-` makes it *read-only* and it won't apply on the element. For example, declaring `intrinsic-width` will ensure that the `width` style is never applied to that element. This allows dimensions to change and update naturally. Otherwise, the width would be computed and applied only the first time, making it static.
215215

216-
`computed` properties can be used to measure styles regardless of their origin - either GSS constraints or CSS styles. Computed properties will not make styles *read-only*, unlike intrinsic properties.
216+
`computed`-prefixed properties can be used to measure styles regardless of their origin - either GSS constraints or CSS styles. Computed properties will not make styles *read-only*, unlike `intrinsic`-prefixed properties.
217217

218218
{% highlight css %}
219219

220-
// apply static width, measure height
221-
// (height style will not be set)
222-
.selectorA {
223-
width: == 200;
224-
height: == &intrinsic-height;
225-
}
220+
// apply static width, measure height
221+
// (height style will not be set)
222+
.selectorA {
223+
width: == 200;
224+
height: == &intrinsic-height;
225+
}
226226

227-
// only measure dimensions
228-
// (height & width styles will not be set)
229-
.selectorB {
230-
width: == &intrinsic-width;
231-
height: == &intrinsic-height;
232-
}
227+
// only measure dimensions
228+
// (height & width styles will not be set)
229+
.selectorB {
230+
width: == &intrinsic-width;
231+
height: == &intrinsic-height;
232+
}
233233

234-
// use dimension information to position elements
235-
.selectorA[right] == .selectorB[left];
234+
// use dimension information to position elements
235+
.selectorA[right] == .selectorB[left];
236236

237237
{% endhighlight %}
238238

@@ -241,7 +241,7 @@
241241

242242
Learn how to use [CCSS constraints](/guides/ccss)
243243

244-
GSS provides conditionnal statements to allow you to do responsive design. Read our [@if @else guide](/guides/ifelse) to learn more.
244+
GSS provides conditional statements to allow you to do responsive design. Read our [@if @else guide](/guides/ifelse) to learn more.
245245

246246
With only CCSS constraints at your disposal, constraining common layout scenarios quickly becomes tedious. Read our
247247
[VFL guide](/guides/ifelse) to learn how to more efficiently constrain your layout.

0 commit comments

Comments
 (0)