Skip to content

Commit 9c37c55

Browse files
authored
New hover color. Move css to css file, it seems to fail in element. (#350)
1 parent 32df04f commit 9c37c55

File tree

2 files changed

+51
-48
lines changed

2 files changed

+51
-48
lines changed

apps/roam/src/components/BirdEatsBugs.tsx

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -108,54 +108,6 @@ export const initFeedbackWidget = (): void => {
108108

109109
birdeatsbug.load();
110110

111-
const customStyles = document.createElement("style");
112-
customStyles.textContent = `
113-
114-
#birdeatsbug-sdk {
115-
--distance-to-window-edge-vertical: 50px;
116-
--distance-to-window-edge-horizontal: 20px;
117-
}
118-
119-
#birdeatsbug-sdk .form-error {
120-
font-size: 1.2rem;
121-
}
122-
123-
#birdeatsbug-sdk:has(.screen) {
124-
box-shadow: none !important;
125-
border-radius: 0 !important;
126-
border: none !important;
127-
}
128-
129-
#birdeatsbug-sdk.dark {
130-
--button-primary-bg-color: #1976d2;
131-
}
132-
133-
button#birdeatsbug-default-button.button {
134-
font-weight: 600;
135-
font-size: 15px;
136-
}
137-
138-
#birdeatsbug-default-button::before {
139-
content: "";
140-
display: inline-block;
141-
width: 20px;
142-
height: 20px;
143-
background-image: url("data:image/svg+xml,%3Csvg width='256' height='264' viewBox='0 0 256 264' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M156.705 252.012C140.72 267.995 114.803 267.995 98.8183 252.012L11.9887 165.182C-3.99622 149.197 -3.99622 123.28 11.9886 107.296L55.4035 63.8807C63.3959 55.8881 76.3541 55.8881 84.3467 63.8807C92.3391 71.8731 92.3391 84.8313 84.3467 92.8239L69.8751 107.296C53.8901 123.28 53.8901 149.197 69.8751 165.182L113.29 208.596C121.282 216.589 134.241 216.589 142.233 208.596C150.225 200.604 150.225 187.646 142.233 179.653L127.761 165.182C111.777 149.197 111.777 123.28 127.761 107.296C143.746 91.3105 143.746 65.3939 127.761 49.4091L113.29 34.9375C105.297 26.9452 105.297 13.9868 113.29 5.99432C121.282 -1.99811 134.241 -1.99811 142.233 5.99434L243.533 107.296C259.519 123.28 259.519 149.197 243.533 165.182L156.705 252.012ZM200.119 121.767C192.127 113.775 179.168 113.775 171.176 121.767C163.184 129.76 163.184 142.718 171.176 150.71C179.168 158.703 192.127 158.703 200.119 150.71C208.112 142.718 208.112 129.76 200.119 121.767Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
144-
background-size: contain;
145-
background-repeat: no-repeat;
146-
margin-right: 8px;
147-
vertical-align: middle;
148-
}
149-
150-
#birdeatsbug-sdk .caret {
151-
height: initial;
152-
width: initial;
153-
border-top: initial;
154-
}
155-
`;
156-
157-
document.head.appendChild(customStyles);
158-
159111
if (window.birdeatsbug && "setOptions" in window.birdeatsbug) {
160112
window.birdeatsbug.setOptions!({
161113
publicAppId: "faf02e48-84b7-4292-b76c-03d9342ba9aa",

apps/roam/src/styles/discourseFloatingMenuStyles.css

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,54 @@
260260
width: initial;
261261
border-top: initial;
262262
}
263+
264+
/* let's cover birdseatbugs settings as well. */
265+
266+
#birdeatsbug-sdk {
267+
--distance-to-window-edge-vertical: 80px;
268+
--distance-to-window-edge-horizontal: 30px;
269+
}
270+
271+
#birdeatsbug-sdk .button-primary:hover,
272+
#birdeatsbug-sdk .button-primary:focus,
273+
#birdeatsbug-sdk .button-secondary:hover,
274+
#birdeatsbug-sdk .button-secondary:focus {
275+
background-color: #1866b4;
276+
}
277+
278+
#birdeatsbug-sdk .form-error {
279+
font-size: 1.2rem;
280+
}
281+
282+
#birdeatsbug-sdk:has(.screen) {
283+
box-shadow: none !important;
284+
border-radius: 0 !important;
285+
border: none !important;
286+
}
287+
288+
#birdeatsbug-sdk.dark {
289+
--button-primary-bg-color: #1976d2;
290+
}
291+
292+
button#birdeatsbug-default-button.button {
293+
font-weight: 600;
294+
font-size: 15px;
295+
}
296+
297+
#birdeatsbug-default-button::before {
298+
content: "";
299+
display: inline-block;
300+
width: 20px;
301+
height: 20px;
302+
background-image: url("data:image/svg+xml,%3Csvg width='256' height='264' viewBox='0 0 256 264' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M156.705 252.012C140.72 267.995 114.803 267.995 98.8183 252.012L11.9887 165.182C-3.99622 149.197 -3.99622 123.28 11.9886 107.296L55.4035 63.8807C63.3959 55.8881 76.3541 55.8881 84.3467 63.8807C92.3391 71.8731 92.3391 84.8313 84.3467 92.8239L69.8751 107.296C53.8901 123.28 53.8901 149.197 69.8751 165.182L113.29 208.596C121.282 216.589 134.241 216.589 142.233 208.596C150.225 200.604 150.225 187.646 142.233 179.653L127.761 165.182C111.777 149.197 111.777 123.28 127.761 107.296C143.746 91.3105 143.746 65.3939 127.761 49.4091L113.29 34.9375C105.297 26.9452 105.297 13.9868 113.29 5.99432C121.282 -1.99811 134.241 -1.99811 142.233 5.99434L243.533 107.296C259.519 123.28 259.519 149.197 243.533 165.182L156.705 252.012ZM200.119 121.767C192.127 113.775 179.168 113.775 171.176 121.767C163.184 129.76 163.184 142.718 171.176 150.71C179.168 158.703 192.127 158.703 200.119 150.71C208.112 142.718 208.112 129.76 200.119 121.767Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
303+
background-size: contain;
304+
background-repeat: no-repeat;
305+
margin-right: 8px;
306+
vertical-align: middle;
307+
}
308+
309+
#birdeatsbug-sdk .caret {
310+
height: initial;
311+
width: initial;
312+
border-top: initial;
313+
}

0 commit comments

Comments
 (0)