Skip to content

Commit

Permalink
Make entire archive/feature item "clickable" (mmistakes#1864)
Browse files Browse the repository at this point in the history
* Make entire feature item "clickable"

Use a pseudo element on the call to action button to cover the entire feature item and make it "clickable".

* Make entire archive item "clickable"

Use a pseudo element on the `<a>` element to cover the entire archive item and make it "clickable".

* Update CHANGELOG and history

* Reference issue
  • Loading branch information
mmistakes authored Oct 2, 2018
1 parent 7bf5355 commit 5c332a9
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Enhancements

- Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864)
- Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842)
- Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836)
- Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837)
Expand Down
53 changes: 53 additions & 0 deletions _sass/minimal-mistakes/_archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
}
}

.archive__item {
position: relative;

a::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
}

.archive__subtitle {
margin: 1.414em 0 0;
padding-bottom: 0.5em;
Expand Down Expand Up @@ -215,6 +228,7 @@
}

.feature__item {
position: relative;
margin-bottom: 2em;
font-size: 1.125em;

Expand Down Expand Up @@ -249,7 +263,17 @@
padding-right: gutter(1 of 12);
}

a.btn::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

&--left {
position: relative;
float: left;
margin-left: 0;
margin-right: 0;
Expand All @@ -261,6 +285,15 @@
margin-bottom: 2em;
}

a.btn::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

@include breakpoint($small) {
.archive__item-teaser {
float: left;
Expand All @@ -277,6 +310,7 @@
}

&--right {
position: relative;
float: left;
margin-left: 0;
margin-right: 0;
Expand All @@ -288,6 +322,15 @@
margin-bottom: 2em;
}

a.btn::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

@include breakpoint($small) {
text-align: right;

Expand All @@ -306,6 +349,7 @@
}

&--center {
position: relative;
float: left;
margin-left: 0;
margin-right: 0;
Expand All @@ -317,6 +361,15 @@
margin-bottom: 2em;
}

a.btn::before {
content: '';
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}

@include breakpoint($small) {
text-align: center;

Expand Down
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2018-09-16T18:19:55-04:00
last_modified_at: 2018-10-02T11:03:51-04:00
toc: true
---

## Unreleased

### Enhancements

- Make entire feature and archive items "clickable". [#1864](https://github.com/mmistakes/minimal-mistakes/pull/1864)
- Allow custom Staticman endpoints. [#1842](https://github.com/mmistakes/minimal-mistakes/issues/1842)
- Remove `type="text/css"` from Algolia script includes. [#1836](https://github.com/mmistakes/minimal-mistakes/pull/1836)
- Remove unneeded `HandheldFriendly` and `MobileOptimized` meta tags. [#1837](https://github.com/mmistakes/minimal-mistakes/pull/1837)
Expand Down

0 comments on commit 5c332a9

Please sign in to comment.