properties
changelog

Minimum Size

Set maximum dimensions for elements including block and inline.

Usage:

  • @size min-*;
  • @size min-w-*;
  • @size min-h-*;
  • @size min-block-*;
  • @size min-inline-*;

Reference

shilp.config.js
/** @type {import('shilpcss/types').ShilpConfig} */
const shilpConfig = {
  source: "react",

  properties: {
    size: {
      min: {
        DEFAULT: {
          property: `
						min-width: <v><i>;
						min-height: <v><i>;
					`,
          resolve: "spacing",
          themeKey: "spacing",
          values: {
            min: "min-content",
            max: "max-content",
            fit: "fit-content",
          },
        },

        block: {
          property: "min-block-size: <v><i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {
            min: "min-content",
            max: "max-content",
            fit: "fit-content",
          },
        },

        h: {
          property: "min-height: <v><i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {
            min: "min-content",
            max: "max-content",
            fit: "fit-content",
            screen: "100vh",
          },
        },

        inline: {
          property: "min-inline-size: <v><i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {
            min: "min-content",
            max: "max-content",
            fit: "fit-content",
          },
        },

        w: {
          property: "min-width: <v><i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {
            min: "min-content",
            max: "max-content",
            fit: "fit-content",
            screen: "100vw",
            stretch: "stretch",
          },
        },
      },
    },
  },
};

export default shilpConfig;

Published at:

Last updated at: