Skip to content

Commit 42759c8

Browse files
authored
Merge pull request #187 from tailwindcss/better-horizontal-card-implementation
Improve the horizontal card example implementation so it's not as trash
2 parents b14d279 + c741c35 commit 42759c8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/source/docs/examples/cards.blade.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ description: null
2828
## Horizontal
2929

3030
@component('_partials.code-sample', ['class' => 'p-10 flex justify-center'])
31-
<div class="max-w-md flex">
32-
<div class="rounded rounded-l w-128 text-center overflow-hidden">
33-
<img class="block h-64" src="{{ $page->baseUrl }}/img/card-left.jpg" alt="Woman holding a mug">
31+
<div class="max-w-md w-full lg:flex">
32+
<div class="h-48 lg:h-auto lg:w-48 flex-none bg-cover rounded rounded-t lg:rounded lg:rounded-l text-center overflow-hidden" style="background-image: url('{{ $page->baseUrl }}/img/card-left.jpg')" title="Woman holding a mug">
3433
</div>
35-
<div class="border-t border-r border-b border-grey-light rounded rounded-r p-4 flex flex-col justify-between">
36-
<div>
34+
<div class="border-r border-b border-l border-grey-light lg:border-l-0 lg:border-t lg:border-grey-light bg-white rounded rounded-b lg:rounded lg:rounded-r p-4 flex flex-col justify-between leading-normal">
35+
<div class="mb-8">
3736
<p class="text-sm text-grey-dark flex items-center">
38-
<svg class="text-grey w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z"/></svg>
37+
<svg class="text-grey w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
38+
<path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z" />
39+
</svg>
3940
Members only
4041
</p>
4142
<div class="text-black font-bold text-xl mb-2">Can coffee make you a better developer?</div>

0 commit comments

Comments
 (0)