Skip to content

Commit

Permalink
Merge pull request #3318 from w3c/kw-format-understanding-notes
Browse files Browse the repository at this point in the history
Address #3314
  • Loading branch information
iadawn authored Jan 4, 2024
2 parents cf3d2fb + 7f7125e commit 0240d8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,16 @@ dt div {
}

.note {
background: var(--off-white);
padding: 1em;
border: 1px solid var(--cloudy);
padding: 0em 1em;
margin-bottom: 1em;
}
.note-title {
font-weight: bold;
margin: 0;
}

.note p {
margin-top: 0;
}

/* import inline styles from https://www.w3.org/WAI/drafts/WCAG-understanding-redesign-hack.html */
Expand Down
9 changes: 8 additions & 1 deletion xslt/generate-understanding.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,13 @@
<xsl:text>: </xsl:text>
</xsl:template>

<xsl:template match="html:p[@class = 'note'] | html:div[@class = 'note']">
<div class="note">
<p class="note-title marker">Note</p>
<xsl:copy><xsl:apply-templates select="@*[not(name() = 'class')]|node()"/></xsl:copy>
</div>
</xsl:template>

<xsl:template match="html:p" mode="sc-info">
<xsl:param name="sc-info"/>
<p>
Expand Down Expand Up @@ -908,7 +915,7 @@
<xsl:when test="name($meta) = 'success-criterion'">Success Criterion (SC) </xsl:when>
</xsl:choose></header>
<div class="box-i">
<xsl:apply-templates select="$meta/content/html:*" mode="wcag-include"/>
<xsl:apply-templates select="$meta/content/html:*" />
</div>
</aside>
<div class="excol-all"/>
Expand Down

0 comments on commit 0240d8b

Please sign in to comment.