6-page-content-elements edit

buttons-wm  edit

Button examples
A tags as buttons, not in P tag. This is an H6
a.content_button a.content_button
_with_arrow
a.content_button a.read more link
BUTTON tags as buttons, not in P tag. This is an H5
Individual P tags with one A button each. This is an H6

p > a.content_button

p > a.content_button
_with_arrow

p > a.content_button

Single P tag with multiple A buttons. This is an H6

P

a.content_button a.content_button a.content_button

/P

Single p.content_button with multiple A tags

P

p.content_button > a p.content_button > a p.content_button > a

/P

Individual P tags, each with one A button

p > a.content_button

a.content_button
_with_arrow

p > a.content_button

Paragraph between buttons to test spacing. He was a three-year starting point guard and helped lead the Bombers to a berth in the NCAA Tournament and an ECAC Upstate New York Championship. Fischer was voted team MVP his senior year. A native of Minnesota, he graduated in 2002 with a degree in business administration and a minor in economics. Below is a mix of p.content_button types

p.content_button a

p.content_button
_with_arrow > a

p.content_button a

p.content_button_with_arrow > strong > a

Button in table
Button in table
button

Text and link.


wm.edu example
Copy
Edit
<!-- components/6-page-content-elements/buttons-wm.php --> <h5 id="buttons">Button examples</h5> <h6>A tags as buttons, not in P tag. This is an H6</h6> <a class="content_button" href="../../as/index.php">a.content_button<span class="fa fa-angle-right" aria-hidden="true" style="top: 28%;"></span></a> <a class="content_button_with_arrow" href="../../as/index.php">a.content_button<br>_with_arrow<span class="fa fa-angle-right" aria-hidden="true" style="top: 28%;"></span></a> <a class="content_button" href="../../as/index.php">a.content_button<span class="fa fa-angle-right" aria-hidden="true" style="top: 28%;"></span></a> <a class="read-more-link" href="">a.read more link</a> <h5>BUTTON tags as buttons, not in P tag. This is an H5</h5> <button class="button">button.button</button> <button class="content_button">button.<br>content_button</button> <button class="content_button_with_arrow">button.<br>content_button<br>_with_arrow <span class="fa fa-angle-right" aria-hidden="true"></span></button> <h6>Individual P tags with one A button each. This is an H6</h6> <p> <a class="content_button" href="">p > a.content_button</a> </p> <p> <a class="content_button_with_arrow" href="index.php">p > a.content_button<br>_with_arrow<span class="fa fa-angle-right" aria-hidden="true" style="top: 23%;"></span></a> </p> <p> <a class="content_button" href="">p > a.content_button</a> </p> <h6>Single P tag with multiple A buttons. This is an H6</h6> <p><code>P</code></p> <p> <a class="content_button" href="">a.content_button</a> <a class="content_button" href="">a.content_button</a> <a class="content_button" href="">a.content_button</a> </p> <p><code>/P</code></p> <h6>Single p.content_button with multiple A tags</h6> <p><code>P</code></p> <p class="content_button"> <a href="">p.content_button > a</a> <a href="">p.content_button > a</a> <a href="">p.content_button > a</a> </p> <p><code>/P</code></p> <h6>Individual P tags, each with one A button</h6> <p><a class="content_button" href="">p > a.content_button</a></p> <p><a class="content_button_with_arrow" href="../../as/index.php">a.content_button<br>_with_arrow<span class="fa fa-angle-right" aria-hidden="true" style="top: 28%;"></span></a></p> <p><a class="content_button" href="">p > a.content_button</a></p> <p>Paragraph between buttons to test spacing. He was a three-year starting point guard and helped lead the Bombers to a berth in the NCAA Tournament and an ECAC Upstate New York Championship. Fischer was voted team MVP his senior year. A native of Minnesota, he graduated in 2002 with a degree in business administration and a minor in economics. <strong>Below is a mix of p.content_button types</strong> </p> <p class="content_button"><span></span><a href=""><span>p.content_button a</span></a></p> <p class="content_button_with_arrow"> <a href="">p.content_button<br>_with_arrow > a<span class="fa fa-angle-right" aria-hidden="true" style="top: 23%;"></span></a> </p> <p class="content_button"><span></span><a href=""><span>p.content_button a</span></a></p> <p class="content_button_with_arrow"> <strong><a href="">p.content_button_with_arrow > strong > a</a></strong> </p> <h6>Button in table</h6> <table class="tablespecial"> <caption>Button in table</caption> <tbody> <tr> <td> <a class="content_button" href="../../about/index.php">button</a> <P>Text and <a href="/">link.</a></P> </td> </tr> </tbody> </table> <hr> <a href="/offices/webanddesign/web/cascade/help/buildandedit/tools/content-buttons/index.php">wm.edu example</a>
Copy
Copy
Edit
/* scss/6-page-content-elements/_buttons-wm.scss */ // ============================================== // W&M BUTTON STYLES // ============================================== // - default button styles // used as-is for main .user_content section, extended in page nav and sidebar // 6 different button class variants (!) // - .content-button-with-arrow overrides // - h5/h6 + button spacing // - .read-more-link styles for .user_content // - .user_content last child padding overrides // - #page_nav button style overrides - set in 7-menus-and-header/_page-nav.scss // - #sidebar button style overrides // - .read-more-link styles // DEFAULT BUTTON STYLES @MIXIN LOCATION // content-button-styles @mixin is found in 2-mixins-and-functions/_mixin-button-styles.scss // ---------------------------------------------- // default button styles button, .button, a.button, a.content_button, .content_button > a, .content_button_with_arrow { @include content-button-styles(); & > span { display: inline; } & .fa-angle-right { display: none; } } .content_button > a:only-of-type, p > a.content_button:only-of-type, p > a.content_button_with_arrow:only-of-type { // margin: 0 auto; // line-height: 1.2; @include breakpoint($mobile-to-wide-mobile-breakpoint) { margin: 0; } } p > a.content_button:first-child, p > a.content_button ~ a.content_button, p > a.content_button_with_arrow:first-child, p > a.content_button_with_arrow ~ a.content_button { margin-bottom: 8px; } // ---------------------------------------------- // -- .content-button-with-arrow overrides .content_button_with_arrow > a, .content_button_with_arrow > strong > a { text-decoration: none !important; color: white; &:hover { text-decoration: none; } } p.content_button_with_arrow { margin-bottom: $md-content-margin; } // ---------------------------------------------- // -- h5/h6 + button spacing h5 +, h6 + { .button, a.content_button, .content_button > a, .content_button_with_arrow, p.content_button, p.content_button_with_arrow { margin-top: kspaces(sm); } } // set spacing between H5/H6 and buttons in paragraph h5 +, h6 + { p > a.content_button:first-child { margin-top: 1rem; } } // set spacing for H5/H6 and paragraph with button class h5 +, h6 + { p.content_button a, p.content_button_with_arrow a { margin-top: 0; } } // ---------------------------------------------- // -- .read-more-link styles for .user_content .read-more-link { @include content-button-styles(); a { color: white; &:hover { text-decoration: none; } } &:last-child { margin-bottom: 0; } } // .user_content table button .user_content table, .user_content_styles table { button, .button, a.button, a.content_button, .content_button > a, .content_button_with_arrow, .read-more-link { color: white; } } // ---------------------------------------------- // .user_content last child padding overrides .user_content, .user_content_styles > { button:last-child, a.button:last-child, .button:last-child, a.content_button:last-child, .content_button > a:last-child, .content_button_with_arrow:last-child { padding: 1rem 2.5rem; } } // ---------------------------------------------- // #page_nav button style overrides - set in 7-menus-and-header/_page-nav.scss // - uses .extra-nav-button class // ---------------------------------------------- // #sidebar button style overrides // - .read-more-link styles are in sidebar.scss