From add4f1138db42533ed3bd94074a7964f21411958 Mon Sep 17 00:00:00 2001 From: Cole Peters Date: Thu, 27 Jun 2024 14:49:31 -0500 Subject: [PATCH] Restore auto margins --- v7/classes/custom/margin.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v7/classes/custom/margin.mjs b/v7/classes/custom/margin.mjs index 605d132..4d12020 100644 --- a/v7/classes/custom/margin.mjs +++ b/v7/classes/custom/margin.mjs @@ -15,6 +15,14 @@ export default function margin(state = {}) { output += `.m${dir[0]}${breakpoint}-none { margin-${dir[1]}: 0; }` }) + // Auto margins + output += '\n' + output += `.m-auto${breakpoint} { margin: auto; }` + directionEntries.forEach(dir => { + output += '\n' + output += `.m${dir[0]}${breakpoint}-auto { margin-${dir[1]}: auto; }` + }) + // Margin scale if (sizes.length) { sizes.forEach(size => {