-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
167 lines (148 loc) · 3.79 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
:root {
--border-color-light: #ccc;
--border-color-dark: #444;
--background-color-light: rgba(100, 100, 100, 0.1);
--background-color-dark: rgba(0, 0, 0, 0.1);
--post-border-light: #ddd;
--post-border-dark: #555;
--post-background-light: #fff;
--post-background-dark: #333;
--shadow-light: rgba(150, 150, 150, 0.3);
--shadow-dark: rgba(0, 0, 0, 0.3);
--text-color-light: rgba(0, 0, 0, 0.9);
--text-color-dark: rgba(255, 255, 255, 0.9);
--content-text-color-light: rgba(0, 0, 0, 0.8);
--content-text-color-dark: rgba(255, 255, 255, 0.8);
--datetime-text-color-light: rgba(0, 0, 0, 0.6);
--datetime-text-color-dark: rgba(255, 255, 255, 0.6);
}
.duckducksocial-results {
display: flex;
flex-direction: row;
padding: 10px;
gap: 15px;
border: 1px solid var(--border-color-light);
background-color: var(--background-color-light);
border-radius: 8px;
max-width: 100%;
overflow-x: auto;
}
.duckducksocial-post {
position: relative;
flex: 0 0 250px;
border: 1px solid var(--post-border-light);
border-radius: 8px;
box-shadow: 0 2px 8px var(--shadow-light);
height: 15em;
width: 12.5em;
background-color: var(--post-background-light);
transition: transform 0.3s ease, box-shadow 0.3s ease;
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 5px;
overflow: hidden;
}
.duckducksocial-post:hover {
transform: translateY(-5px);
box-shadow: 0 4px 12px rgba(150, 150, 150, 0.5);
}
.duckducksocial-username-wrapper {
position: relative;
height: 20px;
}
.duckducksocial-username {
font-weight: bold;
margin: 0;
color: var(--text-color-light);
font-size: 11px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 15px;
}
.duckducksocial-content {
font-size: 12px;
color: var(--content-text-color-light);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3; /* Limits the content to 3 lines when there's media */
margin: 3px 0;
flex-grow: 1; /* Ensures the content grows to fill available space */
max-height: 4.5em; /* Adjust this to prevent cut-off */
}
.duckducksocial-post:not(.has-media) .duckducksocial-content {
-webkit-line-clamp: 10; /* Remove the line clamp if there's no media */
max-height: none;
flex-grow: 0.3;
}
.duckducksocial-datetime {
font-size: 10px;
color: var(--datetime-text-color-light);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
bottom: 5px;
right: 5px;
margin: 0;
}
.duckducksocial-media-container {
width: 100%;
max-height: 6em;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
flex-shrink: 0;
margin: 18px 0;
}
.duckducksocial-media-image,
.duckducksocial-media-video {
max-width: 100%;
max-height: 100%;
object-fit: cover;
display: block;
}
.duckducksocial-hr {
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0;
height: 0.5px;
}
/* Dark mode styles */
@media (prefers-color-scheme: dark) {
.duckducksocial-results {
border: 1px solid var(--border-color-dark);
background-color: var(--background-color-dark);
}
.duckducksocial-post {
border: 1px solid var(--post-border-dark);
box-shadow: 0 2px 8px var(--shadow-dark);
background-color: var(--post-background-dark);
}
.duckducksocial-username {
color: var(--text-color-dark);
}
.duckducksocial-content {
color: var(--content-text-color-dark);
}
.duckducksocial-datetime {
color: var(--datetime-text-color-dark);
}
.duckducksocial-hr {
background-color: #555;
}
}
/* Remove underline from all links and nested elements */
.duckducksocial-results a {
text-decoration: none;
}
.duckducksocial-content a {
color: lightblue;
text-decoration-line: underline;
}