Commit Graph

50 Commits

Author SHA1 Message Date
Dustin Shahidehpour
70e01a4476 Rename uikit/CSSLayout to CSSLayoutKit.
Summary:
When trying to integrate this into an Xcode project that already included CSSLayout.[c|h], we were getting a linker error.

Upon digging in, I found out that Xcode was becoming confused because the imports of the uikit library and the c library are both `#import <CSSLayout/CSSLayout.h>`. So, it needed a new name.

Reviewed By: emilsjolander

Differential Revision: D4162621

fbshipit-source-id: b5f7624eb29f1b9eaebbed5104ec9ea8a12ad2e5
2016-11-11 07:38:15 -08:00
Kazuki Sakamoto
ba2905dd1d Add C# test script for macOS
Summary: - Updated README and added bash script for testing C# on macOS

Reviewed By: emilsjolander

Differential Revision: D4142507

fbshipit-source-id: c682778e42d10242e02f3fdafe8a23f906bfabc5
2016-11-07 19:37:57 -08:00
Kazuki Sakamoto
4d964bdbc3 Update README
Summary:
- Update README for gentest
- Fix gentest.rb for the right working dir

Reviewed By: emilsjolander

Differential Revision: D4065863

fbshipit-source-id: 5c6bd9d18779c05c1de24c06a83b148889facb6b
2016-10-23 10:37:40 -07:00
Kazuki Sakamoto
722bfb9032 Align C# implementation with Java
Summary:
- Align C# implementation with Java JNI implementation
  - No need to call init(reinit)
  - Rename Initialize and Reset
- Add unittests

Reviewed By: emilsjolander

Differential Revision: D4009351

fbshipit-source-id: 191ddec30b0c8518eb0d76c0579afe909b673fac
2016-10-13 08:07:58 -07:00
Emil Sjolander
2a8a4e10c6 Update readme adding UIKit and fixing things that have changed
Summary: Update readme adding UIKit and fixing things that have changed

Differential Revision: D4015068

fbshipit-source-id: 213a60bea6f16ca01a4e613c8e3563f7c354ca8e
2016-10-13 06:22:53 -07:00
mattpodwysocki
dbf3b11946 Add C# example for css-layout CSSNode
Summary:
This PR adds the C# version of the `CSSNode` API calls where it currently has only Java and C versions.
Closes https://github.com/facebook/css-layout/pull/225

Reviewed By: lucasr

Differential Revision: D3936431

Pulled By: emilsjolander

fbshipit-source-id: 689cb359c204c6c52e04e031c66615fb04c001af
2016-09-28 03:23:26 -07:00
Christopher Chedeau
dba5faabb2 Syntax highlight C code in README
Summary: Closes https://github.com/facebook/css-layout/pull/221

Reviewed By: vjeux

Differential Revision: D3914024

Pulled By: emilsjolander

fbshipit-source-id: 4cb0741e526dfefbbb41e8afed1c2f52823df08a
2016-09-23 09:22:38 -07:00
Emil Sjolander
64fffcb8f3 Remove flex section from readme as it now supports all web properties
Summary: Update readme to reflect new support.

Reviewed By: lucasr

Differential Revision: D3856292

fbshipit-source-id: 012f3d1171330cc93c34de300153ff4bb1326819
2016-09-14 08:22:37 -07:00
Emil Sjolander
dd2346f8ac Document format.sh
Summary: Mention format.sh script in README and CONTRIBUTING docs

Reviewed By: IanChilds

Differential Revision: D3728789

fbshipit-source-id: 1d5d99dc627b6cb87898d282aae8adfcaeec7c14
2016-08-17 06:37:43 -07:00
Emil Sjolander
c373056d80 Add the ability to generate multiple test cases
Summary: Modify test generation script to be able to generate multiple test cases

Reviewed By: lucasr

Differential Revision: D3714577

fbshipit-source-id: d2bc2155712f946c5a24231a9532d2acc097524c
2016-08-15 09:23:28 -07:00
Emil Sjolander
1ce14cd097 Update readme
Summary: Docs!

Reviewed By: IanChilds

Differential Revision: D3709305

fbshipit-source-id: 1c8b7c1395bd78f073195eade1839ead4d9dacad
2016-08-12 08:52:41 -07:00
Emil Sjolander
cdf18b9c2b Update readme with java instructions
Summary: Java instructions were missing from the readme. Add a quick note about how to run tests in java.

Reviewed By: lucasr

Differential Revision: D3648981

fbshipit-source-id: d9009a60bb1bb0837722f914981ef4e31f0adb68
2016-08-02 08:08:09 -07:00
Emil Sjolander
8ffff2bfaf update readme
Summary: Update readme with info about building and github markdown syntax

Differential Revision: D3613284

fbshipit-source-id: 1f57009ccf02a48fe100f675ce08503e15cb6c22
2016-07-25 09:52:59 -07:00
FBShipIt
fdd8552c4e Import new C source of truth css-layout
fbshipit-source-id: e866918d6c62fc1cf3a04c269f782b94db9b875a
2016-07-25 15:53:07 +01:00
Emil Sjolander
c06752e052 Remove whitespace on empty lines etc. 2016-06-03 22:19:03 +01:00
Adam Comella
f3dd51ab97 Alter layout engine to conform closer to W3C spec
The primary goals of this change are:
  - Better conformance to the W3C flexbox standard (https://www.w3.org/TR/css-flexbox-1/)
    and a clear articulation of the areas where it deviates from the spec.
  - Support for flex-shrink.
  - Conformance with layout effects of "overflow: hidden".

Specifically, here are the limitations of this implementation as compared to the W3C
flexbox standard (this is also documented in Layout.js):
  - Display property is always assumed to be 'flex' except for Text nodes, which
    are assumed to be 'inline-flex'.
  - The 'zIndex' property (or any form of z ordering) is not supported. Nodes are
    stacked in document order.
  - The 'order' property is not supported. The order of flex items is always defined
    by document order.
  - The 'visibility' property is always assumed to be 'visible'. Values of 'collapse'
    and 'hidden' are not supported.
  - The 'wrap' property supports only 'nowrap' (which is the default) or 'wrap'. The
    rarely-used 'wrap-reverse' is not supported.
  - Rather than allowing arbitrary combinations of flexGrow, flexShrink and
    flexBasis, this algorithm supports only the three most common combinations:
      - flex: 0 is equiavlent to flex: 0 0 auto
      - flex: n (where n is a positive value) is equivalent to flex: n 0 0
      - flex: -1 (or any negative value) is equivalent to flex: 0 1 auto
  - Margins cannot be specified as 'auto'. They must be specified in terms of pixel
    values, and the default value is 0.
  - The 'baseline' value is not supported for alignItems and alignSelf properties.
  - Values of width, maxWidth, minWidth, height, maxHeight and minHeight must be
    specified as pixel values, not as percentages.
  - There is no support for calculation of dimensions based on intrinsic aspect ratios
    (e.g. images).
  - There is no support for forced breaks.
  - It does not support vertical inline directions (top-to-bottom or bottom-to-top text).

And here is how the implementation deviates from the standard (this is also documented in
Layout.js):
  - Section 4.5 of the spec indicates that all flex items have a default minimum
    main size. For text blocks, for example, this is the width of the widest word.
    Calculating the minimum width is expensive, so we forego it and assume a default
    minimum main size of 0.
  - Min/Max sizes in the main axis are not honored when resolving flexible lengths.
  - The spec indicates that the default value for 'flexDirection' is 'row', but
    the algorithm below assumes a default of 'column'.
2016-04-26 19:45:58 -07:00
Ingvar Stepanyan
acd295e470 Add C# to the supported language list 2016-01-13 14:15:48 +00:00
William Carroll
b7856ce26a grammatical fix
also, on line 134, I could be wrong, but be wary of this sentence: "No C implementation of this function is provided in provided..." Perhaps this is a mistake.

thanks for all the awesome code!
2015-11-10 22:46:41 -08:00
Michael
aac6694127 Add C usage to documentation.
Fixes #114.
2015-11-07 08:29:12 -08:00
Seth Broweleit
2cf795c118 Update README.md
"alignContent" is not supported - see image: https://raw.githubusercontent.com/getsetbro/images/gh-pages/screenshots/reactnative.no.flexbox.aligncontent.png
2015-10-02 16:36:29 -05:00
Colin Eberhardt
baf34484fe Updated repo to include cdnjs / npm instructions 2015-08-31 22:15:46 +01:00
Colin Eberhardt
fefc7b7496 Fixed variable name error
(should have run the code before commiting!)
2015-08-17 17:16:18 +01:00
Colin Eberhardt
e9b1258d5f Merge pull request #108 from ColinEberhardt/api-update
Updated the public API to no-longer extract nodes
2015-08-17 11:50:27 +01:00
Pierre Renaux
c174b92f62 doc(README.md): Added alignContent in the list of supported attributes and in the default values ; 2015-08-13 17:11:05 +08:00
Colin Eberhardt
f9bb74aedf Updated the public API to no-longer extract nodes 2015-08-13 09:56:16 +01:00
Colin Eberhardt
fec329f800 Updated README and travis.yml 2015-08-12 08:45:41 +01:00
Colin Eberhardt
5653e4ef82 Fixed build and added distribution files to the repo 2015-08-11 21:22:27 +01:00
Colin Eberhardt
7f9b3afe33 Updated documentation
(And added missing change from previous commit!)
2015-08-11 17:56:21 +01:00
Christopher Chedeau
329bbfd569 Update README.md 2015-05-08 13:42:55 -07:00
Christopher Chedeau
9f75dc7b3e Update README.md 2015-05-08 13:42:37 -07:00
Russell Keith-Magee
c523b7c404 Added support for min/max width and height constraints. 2015-03-31 17:32:54 +08:00
Christopher Chedeau
0b892f7142 Update README.md 2015-02-22 09:25:54 -08:00
daviskoh
e67d71959a update docs w/ npm test command 2015-02-04 22:42:27 -05:00
Kyle Mathews
ecc61dae85 Remove "not used in production" warning
Given recent announcements... :)
2015-02-02 00:20:40 -07:00
Kyle Mathews
524d1eb38f Typos in README.md 2014-10-30 09:28:03 -07:00
Christopher Chedeau
6affe81549 Update README.md 2014-10-30 09:25:04 -07:00
Christopher Chedeau
d5604f909b Update README.md 2014-10-30 09:24:29 -07:00
Christopher Chedeau
6ced150948 Update README.md 2014-10-29 09:07:22 -07:00
Christopher Chedeau
02ca9b880b Update README.md 2014-10-29 08:58:36 -07:00
Christopher Chedeau
8e1f049dcb Update README.md 2014-10-29 08:54:30 -07:00
Christopher Chedeau
c0f895c6f2 Make align-items: stretch the default 2014-10-08 09:35:44 -07:00
Christopher Chedeau
d26a3fabd6 Update README.md 2014-09-11 10:47:43 -07:00
Christopher Chedeau
faeca4bde5 Positive values in Readme 2014-04-27 12:17:59 -07:00
Christopher Chedeau
66096e2ca6 Add border: 0 solid default 2014-04-22 11:53:56 -07:00
Christopher Chedeau
7419f26dd8 Support for negative spacing in README! 2014-04-22 11:53:11 -07:00
Christopher Chedeau
dc8d706e4e Adding borderWidth support to the README 2014-04-22 11:46:12 -07:00
Christopher Chedeau
7549e2c130 Update README.md 2014-04-16 17:46:07 -07:00
Christopher Chedeau
3e2dd93db2 Update README.md 2014-04-16 17:35:25 -07:00
Christopher Chedeau
5d8d13b05b Update README.md 2014-04-06 18:43:46 -07:00
Christopher Chedeau
869eeb74f8 Create README.md 2014-04-06 18:41:56 -07:00