diff --git a/docs/assets/css/styles.css b/docs/assets/css/styles.css index c8f0f320827..d9011478f53 100644 --- a/docs/assets/css/styles.css +++ b/docs/assets/css/styles.css @@ -101,3 +101,12 @@ pre.editable.live:after { min-height: 10rem; background-color: rgba(255, 0, 0, .1); } + +.card-img-left { + border-top-left-radius: calc(0.25rem - 1px); + border-bottom-left-radius: calc(0.25rem - 1px); + } +.card-img-right { + border-top-right-radius: calc(0.25rem - 1px); + border-bottom-right-radius: calc(0.25rem - 1px); +} diff --git a/src/components/card/README.md b/src/components/card/README.md index 3d9b7f5de51..2d5d93bb7aa 100755 --- a/src/components/card/README.md +++ b/src/components/card/README.md @@ -100,6 +100,7 @@ card is changed. ```html
+

Top and Bottom

Some quick example text to build on the card and make up the bulk of the card's content.

-
-
+ + +
+

Left and Right (or Start and End)

+ +

+ Add to your css:
+ + .card-img-left {
+   border-top-left-radius: calc(0.25rem - 1px);
+   border-bottom-left-radius: calc(0.25rem - 1px);
+ } +
+

+
+ +

+ Add to your css:
+ + .card-img-right {
+   border-top-right-radius: calc(0.25rem - 1px);
+   border-bottom-right-radius: calc(0.25rem - 1px);
+ } +
+

+
- ``` @@ -126,7 +155,7 @@ Place the image in the background of the card by setting the boolean prop `overl ```html
{ }) }) + it('should add flex-row to a img-left or img-right image', async () => { + const { app } = window + const node = app.$refs['img_card'] + const childNodes = [...node.childNodes] + const imgEl = childNodes.find(el => el.tagName && el.tagName === 'IMG') + + expect(imgEl).toBeDefined() + expect(imgEl.classList).toEqual(expect.objectContaining(/^flex-row/)) + }) + it("should use the 'tag' for element tag", async () => { const { app: { $refs } } = window const $titleCard = $refs.card_group.querySelector('#title-tag-test')