Skip to content

Commit efe3401

Browse files
committed
Adjusted styling to work with Firefox
1 parent a36f3f4 commit efe3401

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

src/lib/devtools/defaults.clj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@
116116
(sanitize-css (string/join (check-semicolons evald-args))))))
117117

118118
(defmacro get-body-line-common-style []
119-
`(css "min-height: 14px;"))
119+
`(css "min-height: 14px;"
120+
"display: flex;"
121+
"align-items: start;"))
120122

121123
(defmacro get-common-type-header-style []
122124
`(css (str "color: " (named-color :type-text) ";")
123125
"padding: 0px 2px 0px 2px;"
124-
"-webkit-user-select: none;"))
126+
"user-select: none;"))
125127

126128
(defmacro get-inner-background-style []
127129
`(css "position: absolute;"
@@ -152,7 +154,7 @@
152154
`(css "position: relative;"
153155
"padding: 0px 4px;"
154156
"border-radius: 2px;"
155-
"-webkit-user-select: none;"))
157+
"user-select: none;"))
156158

157159
; -- style macros -----------------------------------------------------------------------------------------------------------
158160

@@ -170,8 +172,9 @@
170172
"vertical-align: top;"
171173
"position: relative;"
172174
"margin-right: 3px;"
175+
"margin-top: 2px;"
173176
"border-radius: 2px;"
174-
"-webkit-user-select: none;"
177+
"user-select: none;"
175178
(if (= ~kind :slim)
176179
"padding: 0px 4px; top:2px;"
177180
"padding: 1px 4px; top:1px;")))

src/lib/devtools/defaults.cljs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@
244244
"padding: 0px 4px 0px 4px;"
245245
"margin: 1px 0px 0px 0px;")
246246

247-
:fn-header-style (css)
247+
:fn-header-style (css "display: inline-flex;"
248+
"align-items: center;")
248249
:fn-prefix-style (css)
249250
:nil-style (css (str "color: " (named-color :nil) ";"))
250251
:keyword-style (css (str "color: " (named-color :keyword) ";"))
@@ -263,14 +264,14 @@
263264
:native-reference-wrapper-style (css "position: relative;"
264265
"display: inline-flex;")
265266
:native-reference-style (css "padding: 0px 3px;"
266-
"margin: -4px 0px -2px;"
267267
"position: relative;"
268268
"top: 1px;")
269269

270270
:type-wrapper-style (css "position: relative;"
271271
"padding-left: 1px;"
272272
"border-radius: 2px;")
273-
:type-ref-style (css "position: relative;")
273+
:type-ref-style (css (str "background-color:" (named-color :type) ";")
274+
"border-radius: 0 2px 2px 0;")
274275
:type-header-style (css (d/get-common-type-header-style)
275276
"border-radius: 2px;")
276277
:type-name-style (css "padding-right: 4px;")
@@ -323,7 +324,7 @@
323324
"border-radius: 0 2px 2px 0;")
324325
:meta-style (css (str "color: " (named-color :meta-text) ";")
325326
"padding: 0px 3px;"
326-
"-webkit-user-select: none;")
327+
"user-select: none;")
327328
:meta-body-style (css (str "background-color: " (named-color :meta 0.1) ";")
328329
(str "box-shadow: 0px 0px 0px 1px " (named-color :meta) " inset;")
329330
"position: relative;"
@@ -363,7 +364,7 @@
363364
"border-radius: 2px;"
364365
"padding: 0px 4px 0px 4px;"
365366
"margin: 1px 0px 0px 0px;"
366-
"-webkit-user-select: none;")
367+
"user-select: none;")
367368
:body-style (css "display: inline-block;"
368369
"padding: 3px 12px;"
369370
(str "border-top: 2px solid " (named-color :body-border) ";")
@@ -380,7 +381,7 @@
380381
"margin-right: 3px;"
381382
"padding: 0px 4px 0px 4px;"
382383
"margin: 1px 0px 0px 0px;"
383-
"-webkit-user-select: none;")
384+
"user-select: none;")
384385
:expanded-string-style (css "padding: 0px 12px 0px 12px;"
385386
(str "color: " (named-color :string) ";")
386387
"white-space: pre;"

src/lib/devtools/formatters/markup.cljs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
(<reference-surrogate> nil preview-markup (or details-markup default-details-fn)))
214214
preview-markup)))
215215

216-
; -- mete-related markup ----------------------------------------------------------------------------------------------------
216+
; -- meta-related markup ----------------------------------------------------------------------------------------------------
217217

218218
(defn <meta> [metadata]
219219
(let [body-fn (fn [] [:meta-body-tag (<preview> metadata)])
@@ -253,9 +253,8 @@
253253
arities-markup (<arities> arities)
254254
name-markup (if-not lambda? [:fn-name-tag name])
255255
icon-markup (if lambda? :lambda-icon :fn-icon)
256-
prefix-markup [:fn-prefix-tag icon-markup name-markup]
257-
preview-markup [:fn-header-tag prefix-markup arities-markup]
258-
details-fn (partial <function-details> fn-obj ns name arities prefix-markup)]
256+
preview-markup [:fn-header-tag icon-markup name-markup arities-markup]
257+
details-fn (partial <function-details> fn-obj ns name arities icon-markup name-markup)]
259258
(<reference-surrogate> fn-obj preview-markup details-fn)))
260259

261260
; -- type markup ------------------------------------------------------------------------------------------------------------
@@ -282,7 +281,6 @@
282281
preview-markup [(or header-tag :type-header-tag) :type-symbol name-markup]
283282
details-markup-fn (partial <type-details> constructor-fn ns name basis)]
284283
[:type-wrapper-tag
285-
:type-header-background
286284
[:type-ref-tag (<reference-surrogate> constructor-fn preview-markup details-markup-fn)]]))
287285

288286
(defn <standalone-type> [constructor-fn & [header-tag]]

0 commit comments

Comments
 (0)