Skip to content

Commit ab87d67

Browse files
Merge pull request #43 from code4rena-dev/mcs/39-card-component-at-narrrow-viewports
Card Component: Enforce min size for image, break/wrap text for names & titles
2 parents df3e48f + 1c23c38 commit ab87d67

File tree

3 files changed

+40
-9
lines changed

3 files changed

+40
-9
lines changed

.github/workflows/semgrep.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
workflow_dispatch: {}
3+
pull_request: {}
4+
push:
5+
branches:
6+
- main
7+
- master
8+
paths:
9+
- .github/workflows/semgrep.yml
10+
schedule:
11+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
12+
- cron: 29 7 * * *
13+
name: Semgrep
14+
jobs:
15+
semgrep:
16+
name: semgrep/ci
17+
runs-on: ubuntu-20.04
18+
env:
19+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
20+
container:
21+
image: returntocorp/semgrep
22+
steps:
23+
- uses: actions/checkout@v3
24+
- run: semgrep ci

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code4rena/components-library",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Code4rena's official components library ",
55
"types": "./dist/lib.d.ts",
66
"exports": {

src/lib/Card/Card.scss

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
background: $color__n-85;
77
border-radius: $border-radius__m;
88
width: 100%;
9-
9+
1010
&--transparent {
1111
background: transparent;
1212
}
13-
13+
1414
&--outlined {
1515
border: 1px solid $color__n-60;
1616
}
@@ -37,7 +37,7 @@
3737
order: 2;
3838
}
3939
}
40-
40+
4141
&__main {
4242
display: flex;
4343
flex-direction: row;
@@ -49,6 +49,8 @@
4949
&__image {
5050
height: 5.625rem;
5151
width: 5.625rem;
52+
min-height: 5.625rem;
53+
min-width: 5.625rem;
5254
border-radius: 50%;
5355
overflow: hidden;
5456
display: flex;
@@ -66,11 +68,15 @@
6668
&--l {
6769
height: 9rem;
6870
width: 9rem;
71+
min-height: 9rem;
72+
min-width: 9rem;
6973
}
7074

7175
&--s {
7276
height: 4rem;
7377
width: 4rem;
78+
min-height: 4rem;
79+
min-width: 4rem;
7480
}
7581

7682
&--radius-l {
@@ -106,12 +112,13 @@
106112
margin: 0 $spacing__m;
107113
flex-grow: 1;
108114
order: 2;
115+
word-break: break-all;
109116
}
110117

111118
&__cta {
112119
order: 3;
113120
}
114-
121+
115122
&__footer {
116123
color: $color__n-10;
117124
border-top: 1px solid $color__n-60;
@@ -120,10 +127,10 @@
120127
justify-content: space-between;
121128
padding: 0;
122129
}
123-
130+
124131
&__footer-link-wrapper {
125132
padding: 0;
126-
133+
127134
a {
128135
color: $color__n-10;
129136
border-left: 1px solid $color__n-60;
@@ -136,10 +143,10 @@
136143
}
137144
}
138145
}
139-
146+
140147
&__footer-details {
141148
padding: $spacing__s $spacing__m;
142149
margin: 0;
143150
justify-self: flex-start;
144151
}
145-
}
152+
}

0 commit comments

Comments
 (0)