Skip to content

Commit

Permalink
chore: Update branch with latest landmark-example changes and submo…
Browse files Browse the repository at this point in the history
…dule updates
  • Loading branch information
w3cgruntbot committed Jan 29, 2025
1 parent eda057e commit 40313c9
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 73 deletions.
73 changes: 4 additions & 69 deletions ARIA/apg/patterns/landmarks/landmarks-pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,82 +27,17 @@ lang: en
rel="stylesheet"
href="../../../../content-assets/wai-aria-practices/patterns/landmarks/css/tabs.css"
/>
<link
rel="stylesheet"
href="../../../../content-assets/wai-aria-practices/patterns/landmarks/css/landmarks-pattern.css"
/>

<script src="../../../../content-assets/wai-aria-practices/shared/js/highlight.pack.js"></script>
<script src="../../../../content-assets/wai-aria-practices/shared/js/app.js"></script>

<script src="../../../../content-assets/wai-aria-practices/patterns/landmarks/js/tabs-automatic.js"></script>
<script src="../../../../content-assets/wai-aria-practices/patterns/landmarks/js/image-resizing.js"></script>

<style>
.landmark h3 {
margin: 0;
padding: 0;
}
.landmark [role="tabpanel"] h3 {
margin: 0;
padding: 0;
margin-top: 1em;
}

[role="tabpanel"] pre {
margin: 0;
padding: 0;
}
pre code.hljs {
background-color: #eee;
}

fieldset {
margin-top: 1em;
max-width: 15em;
}

label {
margin-top: 0.5em;
display: block;
}

input[type="text"] {
margin: 0;
padding: 0;
display: block;
}

input[type="submit"] {
margin-top: 1em;
display: block;
}

#at figure {
margin: 0;
padding: 0;
margin-top: 2em;
border: 2px solid #005a9c;
border-radius: 5px;
background-color: #ddd;
width: auto;
max-width: 760px;
overflow: clip;
}

#at figure figcaption {
margin: 0;
padding: 0.5em;
background-color: #ddd;
text-align: center;
font-weight: bold;
font-size: 110%;
}

#at figure img {
margin: 0;
padding: 2px;
border: none;
width: auto;
}
</style>


<link
rel="stylesheet"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.landmark h3 {
margin: 0;
padding: 0;
}

.landmark [role=tabpanel] h3 {
margin: 0;
padding: 0;
margin-top: 1em;
}

[role=tabpanel] pre {
margin: 0;
padding: 0;
}

pre code.hljs {
background-color: #eee;
}

fieldset {
margin-top: 1em;
max-width: 15em;
}

label {
margin-top: 0.5em;
display: block;
}

input[type=text] {
margin: 0;
padding: 0;
display: block;
}

input[type=submit] {
margin-top: 1em;
display: block;
}

#at figure {
margin: 0;
padding: 0;
margin-top: 2em;
border: 2px solid #005a9c;
border-radius: 5px;
background-color: #ddd;
width: auto;
max-width: 760px;
}

#at figure figcaption {
margin: 0;
padding: 0.5em;
background-color: #ddd;
text-align: center;
font-weight: bold;
font-size: 110%;
}

#at figure img {
margin: 0;
padding: 2px;
border: none;
width: auto;
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
/* image-resizing.js */
function resizeImagesInFigures () {
/*
* This content is licensed according to the W3C Software License at
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*
* File: image-resizing.js
*
* Desc: Resizes images to fit in figure elements
*/

'use strict';

function resizeImagesInFigures() {
const figures = document.querySelectorAll('#at figure');
for(let i = 0; i < figures.length; i += 1) {
for(let i = 0; i < figures.length; i++) {
const image = figures[i].querySelector('img');
if (image) {
const rect = figures[i].getBoundingClientRect();
Expand Down

0 comments on commit 40313c9

Please sign in to comment.