How to use css-layout - 4 common examples

To help you get started, we’ve selected a few css-layout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dlmanning / react-flexbox-svg / src / flex.jsx View on Github external
computeLayoutAndBroadcastResults () {
    computeLayout(this.stylesRoot);
    this.layoutNotifier.emit('layout-update', this.stylesRoot);
  }
github zoopoetics / react-svg-flexbox / src / components / flexbox / index.js View on Github external
getComputedLayout(childrenWithMergedStyles, style) {
    const layout = {
      children: Array.from(childrenWithMergedStyles || []),
      style: {...style},
    };
    computeLayout(layout);
    return layout;
  }
github lwansbrough / react-three-ui / src / components / UI.js View on Github external
computeLayout() {
    const styleTree = buildStyleTree({
      type: {
        isThreeUIComponent: true
      },
      props: {
        style: {
          height: this.props.height,
          width: this.props.width
        },
        children: this.props.children
      }
    });
    computeLayout(styleTree);
    this.setState({ styleTree });
  }
github lwansbrough / react-three-ui / src / components / UI.js View on Github external
this.raycasters = {};
    this.state = {
      styleTree: buildStyleTree({
        type: {
          isThreeUIComponent: true
        },
        props: {
          style: {
            height: props.height,
            width: props.width
          },
          children: props.children
        }
      })
    };
    computeLayout(this.state.styleTree);
  }

css-layout

Reimplementation of CSS layout using pure JavaScript

MIT
Latest version published 9 years ago

Package Health Score

68 / 100
Full package analysis

Popular css-layout functions