Typos in README.md
This commit is contained in:
@@ -7,7 +7,7 @@ css-layout
|
|||||||
|
|
||||||
This project implements a subset of CSS including flexbox and the box model using pure JavaScript, then transpiled to C and Java. The goal is to have a small standalone library to layout elements. It doesn't rely on the DOM at all.
|
This project implements a subset of CSS including flexbox and the box model using pure JavaScript, then transpiled to C and Java. The goal is to have a small standalone library to layout elements. It doesn't rely on the DOM at all.
|
||||||
|
|
||||||
In order to make sure that the code is correct, it is developped in JavaScript using TDD where each commit adds a unit test and the associated code to make it work. All the unit tests are tested against Chrome's implementation of CSS.
|
In order to make sure that the code is correct, it is developed in JavaScript using TDD where each commit adds a unit test and the associated code to make it work. All the unit tests are tested against Chrome's implementation of CSS.
|
||||||
|
|
||||||
The JavaScript version has been implemented in a way that can be easily transpiled to C and Java via regexes. The layout function doesn't do any allocation nor uses any of the dynamic aspect of JavaScript. The tests are also transpiled to make sure that the implementations are correct everywhere.
|
The JavaScript version has been implemented in a way that can be easily transpiled to C and Java via regexes. The layout function doesn't do any allocation nor uses any of the dynamic aspect of JavaScript. The tests are also transpiled to make sure that the implementations are correct everywhere.
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Usage
|
|||||||
|
|
||||||
A single function `computeLayout` is exposed and
|
A single function `computeLayout` is exposed and
|
||||||
- takes a tree of nodes: `{ style: { ... }, children: [ nodes ] }`
|
- takes a tree of nodes: `{ style: { ... }, children: [ nodes ] }`
|
||||||
- returns a tree of rectanges: `{ width: ..., height: ..., top: ..., left: ..., children: [ rects ] }`
|
- returns a tree of rectangles: `{ width: ..., height: ..., top: ..., left: ..., children: [ rects ] }`
|
||||||
|
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user