refactoring links icon handling depending on global context
This commit is contained in:
parent
983afffe28
commit
0abdca3d8e
79
resources/css/base/links.css
Normal file
79
resources/css/base/links.css
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
:root :where(a:where(:not(.wp-element-button))) {
|
||||
text-decoration: unset;
|
||||
}
|
||||
/* EXTERNAL LINKS IN NEW TAB */
|
||||
|
||||
a:not(
|
||||
.cta--secondary,
|
||||
.wp-block-button__link,
|
||||
.cta,
|
||||
.homegrade-blocks-lien-chapitre__cta,
|
||||
.breadcrumbs_navigation a,
|
||||
.share-link,
|
||||
.previous-next-posts__link
|
||||
) {
|
||||
/* &[rel='noreferrer noopener'] {
|
||||
&:after {
|
||||
@apply ml-2 inline-block;
|
||||
content: url('../resources/img/graphic-assets/icone-external-link-purple.svg');
|
||||
transform: translateY(1px);
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
main
|
||||
a[target='_blank']:not(.cta--primary, .cta--button, .wp-block-button__link):not(
|
||||
[href*='homegrade\.local']
|
||||
):not([href*='homegrade\.brussels']) {
|
||||
@apply inline-flex items-center;
|
||||
@apply px-2 py-1;
|
||||
@apply text-primary underline font-bold relative;
|
||||
|
||||
&:after {
|
||||
@apply ml-2 inline-block;
|
||||
/* content: url('../resources/img/graphic-assets/icone-external-link-purple.svg'); */
|
||||
/* transform: translateY(-3px); */
|
||||
|
||||
html[lang='fr-FR'] & {
|
||||
content: "S'ouvre dans un nouvel onglet ";
|
||||
}
|
||||
html[lang='nl-NL'] & {
|
||||
content: 'Downloaden';
|
||||
}
|
||||
@apply w-4 h-4 inline-block ml-2 bg-center bg-no-repeat;
|
||||
font-size: 0 !important;
|
||||
background-image: url('../resources/img/graphic-assets/icone-external-link-black.svg');
|
||||
}
|
||||
&:hover {
|
||||
@apply rounded-md;
|
||||
background: rgba(239, 239, 239);
|
||||
}
|
||||
}
|
||||
|
||||
/* INTERNAL LINKS TO A PDF */
|
||||
a[href$='.pdf']:is(a[href*='homegrade\.local'], a[href*='homegrade\.brussels']):not(
|
||||
.cta,
|
||||
.brochure-link-format,
|
||||
|
||||
) {
|
||||
@apply inline-flex items-center;
|
||||
&:after {
|
||||
html[lang='fr-FR'] & {
|
||||
content: 'Télécharger';
|
||||
}
|
||||
html[lang='nl-NL'] & {
|
||||
content: 'Downloaden';
|
||||
}
|
||||
@apply w-4 h-4 inline-block ml-2 bg-center bg-no-repeat;
|
||||
font-size: 0 !important;
|
||||
background-image: url('../resources/img/graphic-assets/icon_brochure_download.svg');
|
||||
}
|
||||
}
|
||||
|
||||
.external-link {
|
||||
&:after {
|
||||
@apply ml-2 inline-block;
|
||||
content: url('../resources/img/graphic-assets/icone-external-link-purple.svg');
|
||||
transform: translateY(1px);
|
||||
}
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ article > *:not(.entry-content, .chapter-header-block),
|
|||
margin-top: 9px;
|
||||
}
|
||||
|
||||
a:not(
|
||||
/* a:not(
|
||||
.cta--secondary,
|
||||
.wp-block-button__link,
|
||||
.cta,
|
||||
|
|
@ -171,7 +171,7 @@ article > *:not(.entry-content, .chapter-header-block),
|
|||
transform: translateY(1px);
|
||||
}
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
p + ol,
|
||||
p + ul {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user