How to use @carbon/layout - 10 common examples

To help you get started, we’ve selected a few @carbon/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 carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / styles.js View on Github external
fontWeight: fontWeights.regular,
  lineHeight: rem(40),
  letterSpacing: 0,
};

export const productiveHeading06 = {
  fontSize: rem(scale[9]),
  fontWeight: fontWeights.light,
  lineHeight: rem(50),
  letterSpacing: 0,
};

export const productiveHeading07 = {
  fontSize: rem(scale[11]),
  fontWeight: fontWeights.light,
  lineHeight: rem(64),
  letterSpacing: 0,
};

export const expressiveHeading01 = heading01;

export const expressiveHeading02 = heading02;

export const expressiveHeading03 = {
  fontSize: rem(scale[4]),
  fontWeight: fontWeights.regular,
  lineHeight: '130%',
  letterSpacing: 0,
  breakpoints: {
    xlg: {
      fontSize: rem(scale[4]),
      lineHeight: '125%',
github carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / styles.js View on Github external
fontWeight: fontWeights.regular,
  lineHeight: rem(20),
  letterSpacing: px(0.16),
};

export const bodyShort02 = {
  fontSize: rem(scale[2]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(22),
  letterSpacing: 0,
};

export const bodyLong02 = {
  fontSize: rem(scale[2]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(24),
  letterSpacing: 0,
};

export const code01 = {
  fontFamily: fontFamilies.mono,
  fontSize: rem(scale[0]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(16),
  letterSpacing: px(0.32),
};

export const code02 = {
  fontFamily: fontFamilies.mono,
  fontSize: rem(scale[1]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(20),
github carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / styles.js View on Github external
lg: {
      fontSize: rem(scale[9]),
      fontWeight: fontWeights.semibold,
      lineHeight: '119%',
      letterSpacing: 0,
    },
    xlg: {
      fontSize: rem(scale[10]),
      fontWeight: fontWeights.semibold,
      lineHeight: '117%',
      letterSpacing: 0,
    },
    max: {
      fontSize: rem(scale[12]),
      fontWeight: fontWeights.semibold,
      lineHeight: rem(70),
      letterSpacing: 0,
    },
  },
};

export const expressiveParagraph01 = {
  fontSize: rem(scale[5]),
  fontWeight: fontWeights.light,
  lineHeight: '125%',
  letterSpacing: 0,
  lg: {
    fontSize: rem(scale[6]),
    lineHeight: '129%',
  },
  max: {
    fontSize: rem(scale[7]),
github carbon-design-system / carbon / packages / type / src / spacing.js View on Github external
/**
 * Copyright IBM Corp. 2018, 2018
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { rem } from '@carbon/layout';

export const spacing = {
  margin01: rem(16),
  margin02: rem(24),
  margin03: rem(32),
  layout01: rem(48),
  layout02: rem(64),
  layout03: rem(80),
};
github carbon-design-system / carbon / packages / type / src / styles.js View on Github external
fontWeight: fontWeights.regular,
  lineHeight: rem(26),
  letterSpacing: 0,
};

export const productiveHeading04 = {
  fontSize: rem(scale[6]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(36),
  letterSpacing: 0,
};

export const productiveHeading05 = {
  fontSize: rem(scale[7]),
  fontWeight: fontWeights.regular,
  lineHeight: rem(40),
  letterSpacing: 0,
};

export const productiveHeading06 = {
  fontSize: rem(scale[9]),
  fontWeight: fontWeights.light,
  lineHeight: rem(50),
  letterSpacing: 0,
};

export const productiveHeading07 = {
  fontSize: rem(scale[11]),
  fontWeight: fontWeights.light,
  lineHeight: rem(64),
  letterSpacing: 0,
};