properties
changelog

Move Elements on Axes

Apply translation transforms to move elements on X, Y, Z axes.

Usage:

  • @adjust move-*;
  • @adjust move-3d-*;
  • @adjust move-x-*;
  • @adjust move-y-*;
  • @adjust move-z-*;

Reference

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

  properties: {
    adjust: {
      move: {
        DEFAULT: {
          property: "--mv: translate(<n><v>, <n><v>)<i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {},
        },

        "3d": {
          property: "--mv: translate3d(<n><v>, <n><v>, <n><v>)<i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {},
        },

        x: {
          property: "--mv-x: translateX(<n><v>)<i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {},
        },

        y: {
          property: "--mv-y: translateY(<n><v>)<i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {},
        },

        z: {
          property: "--mv-z: translateZ(<n><v>)<i>;",
          resolve: "spacing",
          themeKey: "spacing",
          values: {},
        },
      },
    },
  },
};

export default shilpConfig;

Published at:

Last updated at: