diff --git a/docs/source/_partials/class-table.blade.php b/docs/source/_partials/class-table.blade.php new file mode 100644 index 000000000000..17b225d589ac --- /dev/null +++ b/docs/source/_partials/class-table.blade.php @@ -0,0 +1,22 @@ +
+
+ + + + + + + + + + @foreach ($rows as $row) + + + + + + @endforeach + +
ClassPropertiesDescription
{{ $row[0] }}{{ $row[1] }}{{ $row[2] }}
+
+
diff --git a/docs/source/docs/background-color.blade.md b/docs/source/docs/background-color.blade.md index ec36b4da93e6..9fdb51cbc5b6 100644 --- a/docs/source/docs/background-color.blade.md +++ b/docs/source/docs/background-color.blade.md @@ -11,26 +11,19 @@ features: @include('_partials.work-in-progress') -
- - - - - - - - - - @foreach ($page->config['colors'] as $name => $value) - - - - - - @endforeach - -
ClassPropertiesDescription
.bg-{{ $name }}background-color: {{ $value }};Set the background color of an element to {{ implode(' ', array_reverse(explode('-', $name))) }}.
-
+@include('_partials.class-table', [ + 'rows' => $page->config['colors']->map(function ($value, $name) { + $class = ".bg-{$name}"; + $code = "background-color: {$value};"; + $color = implode(' ', array_reverse(explode('-', $name))); + $description = "Set the background color of an element to {$color}."; + return [ + $class, + $code, + $description, + ]; + })->values()->all() +]) ## Hover diff --git a/docs/source/docs/background-position.blade.md b/docs/source/docs/background-position.blade.md index c0d2dbf0edb7..5dd2ae2c5159 100644 --- a/docs/source/docs/background-position.blade.md +++ b/docs/source/docs/background-position.blade.md @@ -11,61 +11,52 @@ features: @include('_partials.work-in-progress') -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClassPropertiesDescription
.bg-bottombackground-position: bottom;Place the background image on the bottom edge.
.bg-centerbackground-position: center;Place the background image in the center.
.bg-leftbackground-position: left;Place the background image on the left edge.
.bg-left-bottombackground-position: left bottom;Place the background image on the left bottom edge.
.bg-left-topbackground-position: left top;Place the background image on the left top edge.
.bg-rightbackground-position: right;Place the background image on the right edge.
.bg-right-bottombackground-position: right bottom;Place the background image on the right bottom edge.
.bg-right-topbackground-position: right top;Place the background image on the right top edge.
.bg-topbackground-position: top;Place the background image on the top edge.
-
+@include('_partials.class-table', [ + 'rows' => [ + [ + '.bg-bottom', + 'background-position: bottom;', + 'Place the background image on the bottom edge.', + ], + [ + '.bg-center', + 'background-position: center;', + 'Place the background image in the center.', + ], + [ + '.bg-left', + 'background-position: left;', + 'Place the background image on the left edge.', + ], + [ + '.bg-left-bottom', + 'background-position: left bottom;', + 'Place the background image on the left bottom edge.', + ], + [ + '.bg-left-top', + 'background-position: left top;', + 'Place the background image on the left top edge.', + ], + [ + '.bg-right', + 'background-position: right;', + 'Place the background image on the right edge.', + ], + [ + '.bg-right-bottom', + 'background-position: right bottom;', + 'Place the background image on the right bottom edge.', + ], + [ + '.bg-right-top', + 'background-position: right top;', + 'Place the background image on the right top edge.', + ], + [ + '.bg-top', + 'background-position: top;', + 'Place the background image on the top edge.', + ], + ] +]) diff --git a/docs/tailwind.js b/docs/tailwind.js index 8a8c63e66e70..e92b00ff513c 100644 --- a/docs/tailwind.js +++ b/docs/tailwind.js @@ -71,6 +71,10 @@ config.height = Object.assign(config.height, { '128': '32rem', }) +config.maxHeight = Object.assign(config.maxHeight, { + 'sm': '30rem', +}) + config.padding = Object.assign(config.padding, { '10': '2.5rem', '12': '3rem',