diff --git a/assets/css/content/functions.css b/assets/css/content/functions.css index f823e909c..2d5f14775 100644 --- a/assets/css/content/functions.css +++ b/assets/css/content/functions.css @@ -16,8 +16,8 @@ } .content-inner .detail-header { - margin: 2 0 1em; - padding: 0.5em 1em; + margin: 1em 0; + padding: 0.5em 0.85em 0.5em 1em; background-color: var(--textDetailBackground); border-left: 3px solid var(--textDetailAccent); font-size: 1em; @@ -25,12 +25,7 @@ position: relative; } -.content-inner .detail-header .note { - float: right; -} - .content-inner .detail-header .signature { - display: inline-block; font-family: var(--monoFontFamily); font-size: 1rem; font-weight: 700; @@ -62,6 +57,10 @@ } } +.content-inner .detail-header .icon-action { + margin-top: 3px; +} + .content-inner .specs pre { font-family: var(--monoFontFamily); font-size: 0.9em; diff --git a/assets/css/content/general.css b/assets/css/content/general.css index 9561f48b7..5ecb0a0be 100644 --- a/assets/css/content/general.css +++ b/assets/css/content/general.css @@ -7,6 +7,40 @@ color: var(--textBody); } +.content-inner .heading-with-actions { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + align-items: start; + gap: 6px; +} +.content-inner .heading-with-actions > *:not(h1) { + flex-shrink: 0; +} +.content-inner .heading-with-actions h1 { + flex-grow: 1; + justify-self: flex-start; + max-width: 100%; + margin: 0; + overflow-wrap: break-word; +} +.content-inner .heading-with-actions .icon-action { + width: 20px; + height: 20px; + display: flex; + justify-content: center; + align-items: center; + font-weight: normal; +} +.content-inner .heading-with-actions.top-heading .icon-action { + padding-top: 1.5rem; + font-size: 1.2rem; +} + +.content-inner .top-heading { + padding-top: 1rem; +} + .content-inner :is(h1, h2, h3, h4, h5, h6) { font-family: var(--sansFontFamily); font-weight: 700; @@ -20,10 +54,6 @@ margin: 0.5em 0; } -.content-inner h1.signature { - margin: 0; -} - .content-inner h1.section-heading { margin: 1.5em 0 0.5em; } @@ -32,11 +62,6 @@ font-weight: 300; } -.content-inner h1 .icon-action { - font-size: 1.2rem; - font-weight: normal; -} - .content-inner h2 { font-size: 1.6em; padding-top: 1em; @@ -65,7 +90,6 @@ } .content-inner .icon-action { - float: right; color: var(--iconAction); text-decoration: none; border: none; @@ -73,9 +97,6 @@ background-color: transparent; cursor: pointer; } -.content-inner button.icon-action { - margin-top: 12px; -} .content-inner .icon-action:hover { color: var(--iconActionHover); } diff --git a/lib/ex_doc/formatter/html/templates/detail_template.eex b/lib/ex_doc/formatter/html/templates/detail_template.eex index c3d2ed43a..89459e886 100644 --- a/lib/ex_doc/formatter/html/templates/detail_template.eex +++ b/lib/ex_doc/formatter/html/templates/detail_template.eex @@ -6,15 +6,17 @@ -
Read the license and the plain-text file.} plain_text_file = File.read!(tmp_dir <> "/html/plaintext.html") - assert plain_text_file =~ ~r{PlainText.*}s + assert plain_text_file =~ ~r{PlainText}s assert plain_text_file =~ ~r{
\nThis is plain\n text and nothing\n.+\s+good bye\n}s @@ -516,14 +516,14 @@ defmodule ExDoc.Formatter.HTMLTest do license = File.read!(tmp_dir <> "/html/license.html") - assert license =~ ~r{LICENSE.*}s + assert license =~ ~r{LICENSE}s assert license =~ ~s{
\nLicensed under the Apache License, Version 2.0 (the "License")} content = File.read!(tmp_dir <> "/html/livebookfile.html") - assert content =~ ~r{Title for Livebook Files\s*} + assert content =~ ~r{Title for Livebook Files} assert content =~ ~s{ "/html/plaintextfiles.html") - assert content =~ ~r{Plain Text Files.*}s + assert content =~ ~r{Plain Text Files}s assert content =~ ~r{Read the license and the plain-text file.}