summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--css.html.markdown14
-rw-r--r--d.html.markdown19
-rw-r--r--fr-fr/haml-fr.html.markdown1
3 files changed, 27 insertions, 7 deletions
diff --git a/css.html.markdown b/css.html.markdown
index e3ca94d9..d8f30ca3 100644
--- a/css.html.markdown
+++ b/css.html.markdown
@@ -106,6 +106,20 @@ selected:link { }
/* or an element in focus */
selected:focus { }
+/* any element that is the first child of its parent */
+selector:first-child {}
+
+/* any element that is the last child of its parent */
+selector:last-child {}
+
+/* Just like pseudo classes, pseudo elements allow you to style certain parts of a document */
+
+/* matches a virtual first child of the selected element */
+selector::before {}
+
+/* matches a virtual last child of the selected element */
+selector::after {}
+
/* At appropriate places, an asterisk may be used as a wildcard to select every
element */
* { } /* all elements */
diff --git a/d.html.markdown b/d.html.markdown
index ba24b60f..88a83e41 100644
--- a/d.html.markdown
+++ b/d.html.markdown
@@ -23,8 +23,10 @@ about [D](http://dlang.org/). The D programming language is a modern, general-pu
multi-paradigm language with support for everything from low-level features to
expressive high-level abstractions.
-D is actively developed by Walter Bright and Andrei Alexandrescu, two super smart, really cool
-dudes. With all that out of the way, let's look at some examples!
+D is actively developed by a large group of super-smart people and is spearheaded by
+[Walter Bright](https://en.wikipedia.org/wiki/Walter_Bright) and
+[Andrei Alexandrescu](https://en.wikipedia.org/wiki/Andrei_Alexandrescu).
+With all that out of the way, let's look at some examples!
```c
import std.stdio;
@@ -36,9 +38,10 @@ void main() {
writeln(i);
}
- auto n = 1; // use auto for type inferred variables
+ // 'auto' can be used for inferring types.
+ auto n = 1;
- // Numeric literals can use _ as a digit seperator for clarity
+ // Numeric literals can use '_' as a digit separator for clarity.
while(n < 10_000) {
n += n;
}
@@ -47,13 +50,15 @@ void main() {
n -= (n / 2);
} while(n > 0);
- // For and while are nice, but in D-land we prefer foreach
- // The .. creates a continuous range, excluding the end
+ // For and while are nice, but in D-land we prefer 'foreach' loops.
+ // The '..' creates a continuous range, including the first value
+ // but excluding the last.
foreach(i; 1..1_000_000) {
if(n % 2 == 0)
writeln(i);
}
+ // There's also 'foreach_reverse' when you want to loop backwards.
foreach_reverse(i; 1..int.max) {
if(n % 2 == 1) {
writeln(i);
@@ -78,7 +83,7 @@ struct LinkedList(T) {
class BinTree(T) {
T data = null;
- // If there is only one template parameter, we can omit parens
+ // If there is only one template parameter, we can omit the parentheses
BinTree!T left;
BinTree!T right;
}
diff --git a/fr-fr/haml-fr.html.markdown b/fr-fr/haml-fr.html.markdown
index 0267a380..24be8bf9 100644
--- a/fr-fr/haml-fr.html.markdown
+++ b/fr-fr/haml-fr.html.markdown
@@ -4,6 +4,7 @@ filename: learnhaml.haml
contributors:
- ["Simon Neveu", "https://github.com/sneveu"]
- ["Thibault", "https://github.com/iTech-"]
+lang: fr-fr
---
Haml est un langage de balisage utilisé majoritairement avec Ruby, qui décrit de manière simple et propre le HTML de n'importe quelle page web sans l'utilisation des traditionnelles lignes de code. Le langage est une alternative très populaire au langage de templates Rails (.erb) et permet d'intégrer du code en Ruby dans votre balisage.