update,
This commit is contained in:
146
wordpress-clone/.gitignore
vendored
Normal file
146
wordpress-clone/.gitignore
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
*.del
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/node
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=node
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Snowpack dependency directory (https://snowpack.dev/)
|
||||
web_modules/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional stylelint cache
|
||||
.stylelintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
# Comment in the public line in if your project uses Gatsby and not Next.js
|
||||
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||
# public
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# vuepress v2.x temp and cache directory
|
||||
.temp
|
||||
|
||||
# Docusaurus cache and generated files
|
||||
.docusaurus
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
||||
|
||||
# yarn v2
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
### Node Patch ###
|
||||
# Serverless Webpack directories
|
||||
.webpack/
|
||||
|
||||
# Optional stylelint cache
|
||||
|
||||
# SvelteKit build / generate output
|
||||
.svelte-kit
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/node
|
22
wordpress-clone/package.json
Normal file
22
wordpress-clone/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "daniel_jo_assignment_student",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate": "git add . && git commit -m\"update ddmseoul,\" && git push"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"bootstrap": "^5.2.3",
|
||||
"react-bootstrap": "^2.6.0"
|
||||
}
|
||||
}
|
26
wordpress-clone/quotation.md
Normal file
26
wordpress-clone/quotation.md
Normal file
@@ -0,0 +1,26 @@
|
||||
Hi,this is my apologize to let you wait.
|
||||
|
||||
i update the draft according to the slides
|
||||
(in the figma flow column)
|
||||
|
||||
figma flow mobile
|
||||
figma flow ipad
|
||||
figma flow desktop
|
||||
|
||||
and please find into the link below:
|
||||
https://showcase.louislabs.com/
|
||||
|
||||
to the quote i would like to propose:
|
||||
|
||||
2 page count (including category and list page) = HKD3000
|
||||
2 page count (including search page, result page and not found page) = HKD3000
|
||||
1 details page = HKD1500
|
||||
|
||||
So to get furhter,
|
||||
would you please leave me the current hosting information ?
|
||||
(hosting provider ? wordpress version ?).
|
||||
|
||||
Thanks in advance.
|
||||
|
||||
Given that you want to leave comment in figma:
|
||||
https://www.figma.com/file/P4JCUWfBYkmEkZ96TbMdG4/ddmseoul-teaching-portfilio_assignment?node-id=0%3A1&t=CfENOvWORMXAb1A7-1
|
7
wordpress-clone/readme.md
Normal file
7
wordpress-clone/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
admin / 123456
|
||||
|
||||
https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
|
||||
https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
|
||||
|
||||
original
|
||||
https://unblast.com/
|
BIN
wordpress-clone/screen-capture/screencapture-unblast-articles-5-awesome-free-ipad-apps-for-designers-2023-02-24-10_31_50.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-articles-5-awesome-free-ipad-apps-for-designers-2023-02-24-10_31_50.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/screen-capture/screencapture-unblast-contact-2023-02-24-10_33_21.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-contact-2023-02-24-10_33_21.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/screen-capture/screencapture-unblast-design-articles-2023-02-24-10_33_47.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-design-articles-2023-02-24-10_33_47.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/screen-capture/screencapture-unblast-detergent-isometric-icons-2023-02-24-10_34_55.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-detergent-isometric-icons-2023-02-24-10_34_55.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/screen-capture/screencapture-unblast-error-not-found-2023-02-24-10_35_39.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-error-not-found-2023-02-24-10_35_39.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/screen-capture/screencapture-unblast-redistribution-2023-02-24-10_32_18.png
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/screen-capture/screencapture-unblast-redistribution-2023-02-24-10_32_18.png
(Stored with Git LFS)
Normal file
Binary file not shown.
39
wordpress-clone/wordpress-src/docker-compose.dev.yml
Normal file
39
wordpress-clone/wordpress-src/docker-compose.dev.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
services:
|
||||
db:
|
||||
# We use a mariadb image which supports both amd64 & arm64 architecture
|
||||
image: mariadb:10.6.4-focal
|
||||
# If you really want to use MySQL, uncomment the following line
|
||||
#image: mysql:8.0.27
|
||||
command: "--default-authentication-plugin=mysql_native_password"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=somewordpress
|
||||
- MYSQL_DATABASE=wordpress
|
||||
- MYSQL_USER=wordpress
|
||||
- MYSQL_PASSWORD=wordpress
|
||||
expose:
|
||||
- 3306
|
||||
- 33060
|
||||
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
ports:
|
||||
- 80:80
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
|
||||
- ./src/wp-content/cust-themes:/var/www/html/wp-content/themes
|
||||
# - ./src/wp-content:/var/www/html/wp-content
|
||||
# - ./src/wp-includes:/var/www/html/wp-includes
|
||||
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=db
|
||||
- WORDPRESS_DB_USER=wordpress
|
||||
- WORDPRESS_DB_PASSWORD=wordpress
|
||||
- WORDPRESS_DB_NAME=wordpress
|
||||
|
||||
volumes:
|
||||
db_data:
|
60
wordpress-clone/wordpress-src/docker-compose.prod.yml
Normal file
60
wordpress-clone/wordpress-src/docker-compose.prod.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
services:
|
||||
db:
|
||||
# We use a mariadb image which supports both amd64 & arm64 architecture
|
||||
image: mariadb:10.6.4-focal
|
||||
# If you really want to use MySQL, uncomment the following line
|
||||
#image: mysql:8.0.27
|
||||
command: "--default-authentication-plugin=mysql_native_password"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=somewordpress
|
||||
- MYSQL_DATABASE=wordpress
|
||||
- MYSQL_USER=wordpress
|
||||
- MYSQL_PASSWORD=wordpress
|
||||
expose:
|
||||
- 3306
|
||||
- 33060
|
||||
|
||||
labels:
|
||||
com.example.expire: "2023-05-23"
|
||||
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
ports:
|
||||
- 80
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
|
||||
- ./src/wp-content/cust-themes:/var/www/html/wp-content/themes
|
||||
# - ./src/wp-content:/var/www/html/wp-content
|
||||
# - ./src/wp-includes:/var/www/html/wp-includes
|
||||
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=db
|
||||
- WORDPRESS_DB_USER=wordpress
|
||||
- WORDPRESS_DB_PASSWORD=wordpress
|
||||
- WORDPRESS_DB_NAME=wordpress
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.ddmseoul-http.rule=Host(`ddmseoul_demo.louislabs.com`)"
|
||||
- "traefik.http.routers.ddmseoul-http.entrypoints=web"
|
||||
- "traefik.http.routers.ddmseoul-http.middlewares=ddmseoul-https"
|
||||
- "traefik.http.middlewares.ddmseoul-https.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.ddmseoul-https.rule=Host(`ddmseoul_demo.louislabs.com`)"
|
||||
- "traefik.http.routers.ddmseoul-https.entrypoints=websecure"
|
||||
- "traefik.http.routers.ddmseoul-https.tls.certresolver=myresolver"
|
||||
|
||||
labels:
|
||||
com.example.expire: "2023-05-23"
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: traefik-proxy-network
|
||||
|
||||
volumes:
|
||||
db_data:
|
BIN
wordpress-clone/wordpress-src/docs/Untitled 1.ods
Normal file
BIN
wordpress-clone/wordpress-src/docs/Untitled 1.ods
Normal file
Binary file not shown.
7
wordpress-clone/wordpress-src/pack_theme.sh
Normal file
7
wordpress-clone/wordpress-src/pack_theme.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm -rf dist/twentytwentytwo.zip
|
||||
|
||||
pushd src/wp-content/cust-themes/twentytwentytwo-tryout
|
||||
zip -r /home/logic/_workspace/carousell-comission-playlist/ddmseoul/wordpress-clone/dist/twentytwentytwo.zip .
|
||||
popd
|
12
wordpress-clone/wordpress-src/package.json
Normal file
12
wordpress-clone/wordpress-src/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "wordpress-clone",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
4
wordpress-clone/wordpress-src/readme.md
Normal file
4
wordpress-clone/wordpress-src/readme.md
Normal file
@@ -0,0 +1,4 @@
|
||||
admin / 123456
|
||||
|
||||
https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
|
||||
https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
|
11
wordpress-clone/wordpress-src/rebuild.sh
Normal file
11
wordpress-clone/wordpress-src/rebuild.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
docker compose -f docker-compose.prod.yml kill
|
||||
docker compose -f docker-compose.prod.yml down
|
||||
docker volume rm wordpress-clone_db_data
|
||||
|
||||
set -ex
|
||||
docker compose -f docker-compose.prod.yml up -d --build
|
||||
docker compose -f docker-compose.prod.yml logs -f
|
6
wordpress-clone/wordpress-src/scripts/down_prod.sh
Normal file
6
wordpress-clone/wordpress-src/scripts/down_prod.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
docker compose -f docker-compose.prod.yml kill
|
||||
docker compose -f docker-compose.prod.yml down
|
8
wordpress-clone/wordpress-src/scripts/start_dev.sh
Normal file
8
wordpress-clone/wordpress-src/scripts/start_dev.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
|
||||
docker compose -f docker-compose.dev.yml up -d --build
|
||||
|
||||
docker compose -f docker-compose.dev.yml logs -f
|
7
wordpress-clone/wordpress-src/scripts/start_prod.sh
Normal file
7
wordpress-clone/wordpress-src/scripts/start_prod.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
docker compose -f docker-compose.prod.yml up -d --build
|
||||
|
||||
docker compose logs -f
|
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Silence is golden.
|
@@ -0,0 +1,15 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "strict",
|
||||
"insertPragma": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"printWidth": 120,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "as-needed",
|
||||
"requirePragma": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "all",
|
||||
"useTabs": false,
|
||||
"overrides": []
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
vendor/
|
||||
node_modules/
|
||||
assets/images
|
||||
*.php
|
||||
*.map
|
||||
*.png
|
||||
*.json
|
||||
LICENSE
|
||||
composer.lock
|
||||
*.txt
|
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"extends": [
|
||||
"@wordpress/stylelint-config"
|
||||
],
|
||||
"rules": {
|
||||
"indentation": "tab",
|
||||
"no-duplicate-selectors": null,
|
||||
"function-url-quotes": null,
|
||||
"selector-attribute-quotes": null,
|
||||
"declaration-block-no-duplicate-properties": null,
|
||||
"function-calc-no-unspaced-operator": null,
|
||||
"selector-pseudo-class-no-unknown": null,
|
||||
"selector-class-pattern": null,
|
||||
"font-weight-notation": null,
|
||||
"selector-type-no-unknown": null,
|
||||
"max-line-length": null,
|
||||
"at-rule-empty-line-before": null,
|
||||
"selector-pseudo-element-colon-notation": null,
|
||||
"number-leading-zero": null,
|
||||
"no-descending-specificity": null,
|
||||
"length-zero-no-unit": [true, {"ignore": ["custom-properties"]}]
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": [
|
||||
"@wordpress/stylelint-config/scss"
|
||||
],
|
||||
"rules": {
|
||||
"selector-class-pattern": null,
|
||||
"font-weight-notation": null,
|
||||
"selector-type-no-unknown": null,
|
||||
"max-line-length": null,
|
||||
"at-rule-empty-line-before": null,
|
||||
"selector-pseudo-element-colon-notation": null,
|
||||
"number-leading-zero": null,
|
||||
"no-descending-specificity": null,
|
||||
"length-zero-no-unit": [true, {"ignore": ["custom-properties"]}]
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found)
|
||||
*
|
||||
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<header class="page-header alignwide">
|
||||
<h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="error-404 not-found default-max-width">
|
||||
<div class="page-content">
|
||||
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentytwentyone' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
</div><!-- .page-content -->
|
||||
</div><!-- .error-404 -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
$description = get_the_archive_description();
|
||||
?>
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header alignwide">
|
||||
<?php the_archive_title( '<h1 class="page-title">', '</h1>' ); ?>
|
||||
<?php if ( $description ) : ?>
|
||||
<div class="archive-description"><?php echo wp_kses_post( wpautop( $description ) ); ?></div>
|
||||
<?php endif; ?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<?php while ( have_posts() ) : ?>
|
||||
<?php the_post(); ?>
|
||||
<?php get_template_part( 'template-parts/content/content', get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) ); ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php twenty_twenty_one_the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php get_template_part( 'template-parts/content/content-none' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
get_footer();
|
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Custom Color Overrides
|
||||
*
|
||||
* This file is automatically populated if the user chooses custom colors in the Customizer.
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
Adding print support. The print styles are based on the the great work of
|
||||
Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/.
|
||||
*/
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
>>> TABLE OF CONTENTS:
|
||||
----------------------------------------------------------------
|
||||
# Margins & paddings
|
||||
# Typography
|
||||
# Page breaks
|
||||
# Links
|
||||
# Visibility
|
||||
--------------------------------------------------------------*/
|
||||
@media print {
|
||||
|
||||
/* Margins & paddings */
|
||||
@page {
|
||||
margin: 2cm;
|
||||
}
|
||||
|
||||
.entry .entry-header,
|
||||
.entry,
|
||||
.single .site-main > article > .entry-footer {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.site-footer .site-info {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Fonts */
|
||||
body {
|
||||
font: 13pt Georgia, "Times New Roman", Times, serif;
|
||||
font: 13pt var(--global--font-secondary, Georgia, "Times New Roman", Times, serif);
|
||||
line-height: 1.3;
|
||||
background: #fff !important;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.has-background-dark * {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
h1,
|
||||
.entry-title,
|
||||
.singular .entry-title,
|
||||
.page-title {
|
||||
font-size: 22pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
.has-regular-font-size,
|
||||
.has-large-font-size,
|
||||
h2.author-title,
|
||||
p.author-bio,
|
||||
.comments-title,
|
||||
.archive-description {
|
||||
font-size: 14pt;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.comment-meta,
|
||||
.comment-meta .comment-author .fn {
|
||||
font-size: 13pt;
|
||||
}
|
||||
|
||||
/* Page breaks */
|
||||
a {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
page-break-after: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
page-break-after: avoid;
|
||||
}
|
||||
|
||||
table,
|
||||
pre,
|
||||
figure {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol,
|
||||
dl {
|
||||
page-break-before: avoid;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
a:link,
|
||||
a:visited,
|
||||
a {
|
||||
background: transparent;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
a[href^=http]:after {
|
||||
content: " < " attr(href) "> ";
|
||||
}
|
||||
|
||||
a:after > img {
|
||||
content: "";
|
||||
}
|
||||
|
||||
article a[href^="#"]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
a:not(:local-link):after {
|
||||
content: " < " attr(href) "> ";
|
||||
}
|
||||
|
||||
.entry-title a:after {
|
||||
content: "\a< " attr(href) "> ";
|
||||
white-space: pre;
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.cat-links a:after,
|
||||
.tags-links a:after,
|
||||
.byline a:after,
|
||||
.comment-metadata a:after,
|
||||
.wp-block-calendar a:after,
|
||||
.wp-block-tag-cloud a:after,
|
||||
.page-links a:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Visibility */
|
||||
.primary-navigation,
|
||||
.site-title + .primary-navigation,
|
||||
.footer-navigation,
|
||||
.entry-footer,
|
||||
.post-navigation,
|
||||
.navigation.pagination,
|
||||
.widget-area,
|
||||
.edit-link,
|
||||
.more-link,
|
||||
.comment-reply,
|
||||
.reply,
|
||||
.comment .comment-metadata .edit-link,
|
||||
.comment-respond,
|
||||
#dark-mode-toggler {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.entry .entry-content .wp-block-button .wp-block-button__link,
|
||||
.entry .entry-content .button,
|
||||
.entry .entry-content .wp-block-file__button {
|
||||
color: #000;
|
||||
background: none;
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../sass/07-utilities/print.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAEC;EAEA;IACC;;EAGD;AAAA;AAAA;IAGC;IACA;;EAGD;IACC;;EAGD;IACC;;AAGD;EAEA;IACC;IACA;IACA;IACA;IACA;;EAID;IACC;;EAGD;AAAA;AAAA;AAAA;IAIC;IACA;;EAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IASC;IACA;;EAGD;AAAA;IAEC;;AAGD;EAEA;IACC;;EAGD;IACC;;EAGD;AAAA;AAAA;AAAA;AAAA;AAAA;IAMC;IACA;;EAGD;IACC;IACA;;EAGD;AAAA;AAAA;IAGC;;EAGD;AAAA;AAAA;IAGC;;AAGD;EAEA;AAAA;AAAA;IAGC;IACA;IACA;IACA;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;IACA;IACA;;EAGD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IAOC;;AAGD;EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;IAcC;;EAGD;AAAA;AAAA;IAGC;IACA","file":"print.css"}
|
@@ -0,0 +1,113 @@
|
||||
/* OS dark theme preference */
|
||||
@media only screen {
|
||||
|
||||
.is-dark-theme.is-dark-theme {
|
||||
--global--color-background: var(--global--color-dark-gray);
|
||||
--global--color-primary: var(--global--color-light-gray);
|
||||
--global--color-secondary: var(--global--color-light-gray);
|
||||
--button--color-text: var(--global--color-background);
|
||||
--button--color-text-hover: var(--global--color-secondary);
|
||||
--button--color-text-active: var(--global--color-secondary);
|
||||
--button--color-background: var(--global--color-secondary);
|
||||
--button--color-background-active: var(--global--color-background);
|
||||
--global--color-border: #9ea1a7;
|
||||
|
||||
/* Block: Table */
|
||||
--table--stripes-border-color: rgba(240, 240, 240, 0.15);
|
||||
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
|
||||
}
|
||||
|
||||
.is-dark-theme img {
|
||||
filter: brightness(0.85) contrast(1.1);
|
||||
}
|
||||
|
||||
.respect-color-scheme-preference.is-dark-theme body {
|
||||
background-color: var(--global--color-background);
|
||||
}
|
||||
|
||||
#dark-mode-toggler {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--global--font-size-xs);
|
||||
padding: 0.5em;
|
||||
min-height: 44px;
|
||||
min-width: max-content;
|
||||
border: 2px solid currentColor;
|
||||
box-shadow: none;
|
||||
background: var(--button--color-text);
|
||||
color: var(--button--color-background);
|
||||
z-index: 9998;
|
||||
}
|
||||
|
||||
.no-js #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.fixed-bottom {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.fixed-bottom.hide:not(:focus) {
|
||||
bottom: -80px;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.relative {
|
||||
position: absolute;
|
||||
height: 44px;
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px);
|
||||
left: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em);
|
||||
}
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 782px) {
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 481px) {
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 481px) {
|
||||
|
||||
body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav {
|
||||
top: 88px;
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
.primary-navigation-open #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
#dark-mode-toggler:hover,
|
||||
#dark-mode-toggler:focus {
|
||||
color: var(--button--color-background-active);
|
||||
border: 2px solid var(--button--color-text-active);
|
||||
background-color: var(--button--color-text-active);
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
.is-IE #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media only screen and (prefers-reduced-motion: no-preference) {
|
||||
|
||||
#dark-mode-toggler.fixed-bottom {
|
||||
transition: bottom 0.5s;
|
||||
}
|
||||
}
|
@@ -0,0 +1,113 @@
|
||||
/* OS dark theme preference */
|
||||
@media only screen {
|
||||
|
||||
.is-dark-theme.is-dark-theme {
|
||||
--global--color-background: var(--global--color-dark-gray);
|
||||
--global--color-primary: var(--global--color-light-gray);
|
||||
--global--color-secondary: var(--global--color-light-gray);
|
||||
--button--color-text: var(--global--color-background);
|
||||
--button--color-text-hover: var(--global--color-secondary);
|
||||
--button--color-text-active: var(--global--color-secondary);
|
||||
--button--color-background: var(--global--color-secondary);
|
||||
--button--color-background-active: var(--global--color-background);
|
||||
--global--color-border: #9ea1a7;
|
||||
|
||||
/* Block: Table */
|
||||
--table--stripes-border-color: rgba(240, 240, 240, 0.15);
|
||||
--table--stripes-background-color: rgba(240, 240, 240, 0.15);
|
||||
}
|
||||
|
||||
.is-dark-theme img {
|
||||
filter: brightness(0.85) contrast(1.1);
|
||||
}
|
||||
|
||||
.respect-color-scheme-preference.is-dark-theme body {
|
||||
background-color: var(--global--color-background);
|
||||
}
|
||||
|
||||
#dark-mode-toggler {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--global--font-size-xs);
|
||||
padding: 0.5em;
|
||||
min-height: 44px;
|
||||
min-width: max-content;
|
||||
border: 2px solid currentColor;
|
||||
box-shadow: none;
|
||||
background: var(--button--color-text);
|
||||
color: var(--button--color-background);
|
||||
z-index: 9998;
|
||||
}
|
||||
|
||||
.no-js #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.fixed-bottom {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.fixed-bottom.hide:not(:focus) {
|
||||
bottom: -80px;
|
||||
}
|
||||
|
||||
#dark-mode-toggler.relative {
|
||||
position: absolute;
|
||||
height: 44px;
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px);
|
||||
right: calc(50vw - var(--responsive--alignwide-width) / 2 - 0.5em);
|
||||
}
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 32px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 782px) {
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 46px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 481px) {
|
||||
|
||||
.admin-bar #dark-mode-toggler.relative {
|
||||
top: calc(2.4 * var(--global--spacing-vertical) - 44px + 26px);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 481px) {
|
||||
|
||||
body:not(.primary-navigation-open) #dark-mode-toggler.relative ~ nav {
|
||||
top: 88px;
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
.primary-navigation-open #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
#dark-mode-toggler:hover,
|
||||
#dark-mode-toggler:focus {
|
||||
color: var(--button--color-background-active);
|
||||
border: 2px solid var(--button--color-text-active);
|
||||
background-color: var(--button--color-text-active);
|
||||
}
|
||||
}
|
||||
@media only screen {
|
||||
|
||||
.is-IE #dark-mode-toggler {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media only screen and (prefers-reduced-motion: no-preference) {
|
||||
|
||||
#dark-mode-toggler.fixed-bottom {
|
||||
transition: bottom 0.5s;
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../sass/style-dark-mode.scss"],"names":[],"mappings":"AAAA;AACA;EAEC;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAEA;IACA;IACA;;EAGD;IACC;;EAGD;IACC;;EAGD;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IACC;;EAGD;IACC;IACA;IACA;;EAEA;IACC;;EAIF;IACC;IACA;IACA;IACA;;EAEA;IACC;;;AAEA;EAHD;IAIE;;;AAGD;EAPD;IAQE;;;AAOA;EADD;IAEE;;;AA7EN;EAmFE;IACC;;;AApFH;EAuFE;IAEC;IACA;IACA;;;AA3FH;EA8FE;IACC;;;AAIA;EADD;IAEE","file":"style-dark-mode.css"}
|
@@ -0,0 +1,3 @@
|
||||
/**
|
||||
* These styles are generated by the Customizer and only loaded when a custom color scheme is active.
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/Daffodils.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/Daffodils.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/Reading.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/Reading.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/in-the-bois-de-boulogne.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/in-the-bois-de-boulogne.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/playing-in-the-sand.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/playing-in-the-sand.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/roses-tremieres-hollyhocks-1884.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/roses-tremieres-hollyhocks-1884.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/self-portrait-1885.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/self-portrait-1885.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/the-garden-at-bougival-1884.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/the-garden-at-bougival-1884.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/villa-with-orange-trees-nice.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/villa-with-orange-trees-nice.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/young-woman-in-mauve.jpg
(Stored with Git LFS)
Normal file
BIN
wordpress-clone/wordpress-src/src/wp-content/cust-themes/twentytwentyone-tryout/assets/images/young-woman-in-mauve.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Get luminance from a HEX color.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {string} hex - The hex color.
|
||||
*
|
||||
* @return {number} - Returns the luminance, number between 0 and 255.
|
||||
*/
|
||||
function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line
|
||||
var rgb = twentytwentyoneGetRgbFromHex( hex );
|
||||
return Math.round( ( 0.2126 * rgb.r ) + ( 0.7152 * rgb.g ) + ( 0.0722 * rgb.b ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get RGB from HEX.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {string} hex - The hex color.
|
||||
*
|
||||
* @return {Object} - Returns an object {r, g, b}
|
||||
*/
|
||||
function twentytwentyoneGetRgbFromHex( hex ) {
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
|
||||
result;
|
||||
|
||||
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF").
|
||||
hex = hex.replace( shorthandRegex, function( m, r, g, b ) {
|
||||
return r.toString() + r.toString() + g.toString() + g.toString() + b.toString() + b.toString();
|
||||
} );
|
||||
|
||||
result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec( hex );
|
||||
return result ? {
|
||||
r: parseInt( result[1], 16 ),
|
||||
g: parseInt( result[2], 16 ),
|
||||
b: parseInt( result[3], 16 )
|
||||
} : null;
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
/* global twentytwentyoneGetHexLum, jQuery */
|
||||
( function() {
|
||||
// Add listener for the "background_color" control.
|
||||
wp.customize( 'background_color', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
var lum = twentytwentyoneGetHexLum( to ),
|
||||
isDark = 127 > lum,
|
||||
textColor = ! isDark ? 'var(--global--color-dark-gray)' : 'var(--global--color-light-gray)',
|
||||
tableColor = ! isDark ? 'var(--global--color-light-gray)' : 'var(--global--color-dark-gray)',
|
||||
stylesheetID = 'twentytwentyone-customizer-inline-styles',
|
||||
stylesheet,
|
||||
styles;
|
||||
|
||||
// Modify the html & body classes depending on whether this is a dark background or not.
|
||||
if ( isDark ) {
|
||||
document.body.classList.add( 'is-dark-theme' );
|
||||
document.documentElement.classList.add( 'is-dark-theme' );
|
||||
document.body.classList.remove( 'is-light-theme' );
|
||||
document.documentElement.classList.remove( 'is-light-theme' );
|
||||
document.documentElement.classList.remove( 'respect-color-scheme-preference' );
|
||||
} else {
|
||||
document.body.classList.remove( 'is-dark-theme' );
|
||||
document.documentElement.classList.remove( 'is-dark-theme' );
|
||||
document.body.classList.add( 'is-light-theme' );
|
||||
document.documentElement.classList.add( 'is-light-theme' );
|
||||
if ( wp.customize( 'respect_user_color_preference' ).get() ) {
|
||||
document.documentElement.classList.add( 'respect-color-scheme-preference' );
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle the white background class.
|
||||
if ( 225 <= lum ) {
|
||||
document.body.classList.add( 'has-background-white' );
|
||||
} else {
|
||||
document.body.classList.remove( 'has-background-white' );
|
||||
}
|
||||
|
||||
stylesheet = jQuery( '#' + stylesheetID );
|
||||
styles = '';
|
||||
// If the stylesheet doesn't exist, create it and append it to <head>.
|
||||
if ( ! stylesheet.length ) {
|
||||
jQuery( '#twenty-twenty-one-style-inline-css' ).after( '<style id="' + stylesheetID + '"></style>' );
|
||||
stylesheet = jQuery( '#' + stylesheetID );
|
||||
}
|
||||
|
||||
// Generate the styles.
|
||||
styles += '--global--color-primary:' + textColor + ';';
|
||||
styles += '--global--color-secondary:' + textColor + ';';
|
||||
styles += '--global--color-background:' + to + ';';
|
||||
|
||||
styles += '--button--color-background:' + textColor + ';';
|
||||
styles += '--button--color-text:' + to + ';';
|
||||
styles += '--button--color-text-hover:' + textColor + ';';
|
||||
|
||||
styles += '--table--stripes-border-color:' + tableColor + ';';
|
||||
styles += '--table--stripes-background-color:' + tableColor + ';';
|
||||
|
||||
// Add the styles.
|
||||
stylesheet.html( ':root{' + styles + '}' );
|
||||
} );
|
||||
} );
|
||||
}() );
|
@@ -0,0 +1,25 @@
|
||||
/* global twentytwentyoneGetHexLum */
|
||||
|
||||
( function() {
|
||||
// Wait until the customizer has finished loading.
|
||||
wp.customize.bind( 'ready', function() {
|
||||
// Hide the "respect_user_color_preference" setting if the background-color is dark.
|
||||
if ( 127 > twentytwentyoneGetHexLum( wp.customize( 'background_color' ).get() ) ) {
|
||||
wp.customize.control( 'respect_user_color_preference' ).deactivate();
|
||||
wp.customize.control( 'respect_user_color_preference_notice' ).deactivate();
|
||||
}
|
||||
|
||||
// Handle changes to the background-color.
|
||||
wp.customize( 'background_color', function( setting ) {
|
||||
setting.bind( function( value ) {
|
||||
if ( 127 > twentytwentyoneGetHexLum( value ) ) {
|
||||
wp.customize.control( 'respect_user_color_preference' ).deactivate();
|
||||
wp.customize.control( 'respect_user_color_preference_notice' ).activate();
|
||||
} else {
|
||||
wp.customize.control( 'respect_user_color_preference' ).activate();
|
||||
wp.customize.control( 'respect_user_color_preference_notice' ).deactivate();
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
}() );
|
@@ -0,0 +1,71 @@
|
||||
function toggleDarkMode() { // jshint ignore:line
|
||||
var toggler = document.getElementById( 'dark-mode-toggler' );
|
||||
|
||||
if ( 'false' === toggler.getAttribute( 'aria-pressed' ) ) {
|
||||
toggler.setAttribute( 'aria-pressed', 'true' );
|
||||
document.documentElement.classList.add( 'is-dark-theme' );
|
||||
document.body.classList.add( 'is-dark-theme' );
|
||||
window.localStorage.setItem( 'twentytwentyoneDarkMode', 'yes' );
|
||||
} else {
|
||||
toggler.setAttribute( 'aria-pressed', 'false' );
|
||||
document.documentElement.classList.remove( 'is-dark-theme' );
|
||||
document.body.classList.remove( 'is-dark-theme' );
|
||||
window.localStorage.setItem( 'twentytwentyoneDarkMode', 'no' );
|
||||
}
|
||||
}
|
||||
|
||||
function twentytwentyoneIsDarkMode() {
|
||||
var isDarkMode = window.matchMedia( '(prefers-color-scheme: dark)' ).matches;
|
||||
|
||||
if ( 'yes' === window.localStorage.getItem( 'twentytwentyoneDarkMode' ) ) {
|
||||
isDarkMode = true;
|
||||
} else if ( 'no' === window.localStorage.getItem( 'twentytwentyoneDarkMode' ) ) {
|
||||
isDarkMode = false;
|
||||
}
|
||||
|
||||
return isDarkMode;
|
||||
}
|
||||
|
||||
function darkModeInitialLoad() {
|
||||
var toggler = document.getElementById( 'dark-mode-toggler' ),
|
||||
isDarkMode = twentytwentyoneIsDarkMode();
|
||||
|
||||
if ( isDarkMode ) {
|
||||
document.documentElement.classList.add( 'is-dark-theme' );
|
||||
document.body.classList.add( 'is-dark-theme' );
|
||||
} else {
|
||||
document.documentElement.classList.remove( 'is-dark-theme' );
|
||||
document.body.classList.remove( 'is-dark-theme' );
|
||||
}
|
||||
|
||||
if ( toggler && isDarkMode ) {
|
||||
toggler.setAttribute( 'aria-pressed', 'true' );
|
||||
}
|
||||
}
|
||||
|
||||
function darkModeRepositionTogglerOnScroll() {
|
||||
|
||||
var toggler = document.getElementById( 'dark-mode-toggler' ),
|
||||
prevScroll = window.scrollY || document.documentElement.scrollTop,
|
||||
currentScroll,
|
||||
|
||||
checkScroll = function() {
|
||||
currentScroll = window.scrollY || document.documentElement.scrollTop;
|
||||
if (
|
||||
currentScroll + ( window.innerHeight * 1.5 ) > document.body.clientHeight ||
|
||||
currentScroll < prevScroll
|
||||
) {
|
||||
toggler.classList.remove( 'hide' );
|
||||
} else if ( currentScroll > prevScroll && 250 < currentScroll ) {
|
||||
toggler.classList.add( 'hide' );
|
||||
}
|
||||
prevScroll = currentScroll;
|
||||
};
|
||||
|
||||
if ( toggler ) {
|
||||
window.addEventListener( 'scroll', checkScroll );
|
||||
}
|
||||
}
|
||||
|
||||
darkModeInitialLoad();
|
||||
darkModeRepositionTogglerOnScroll();
|
@@ -0,0 +1,44 @@
|
||||
/* global twentytwentyoneIsDarkMode, setTimeout */
|
||||
|
||||
// Check the color scheme preference and inject the classes if necessary.
|
||||
if ( document.body.classList.contains( 'twentytwentyone-supports-dark-theme' ) ) {
|
||||
twentytwentyoneDarkModeEditorInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Once the editor loads, add the dark mode class.
|
||||
*
|
||||
* Wait for the editor to load by periodically checking for an element, then we add the classes.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {number} attempt Track the number of tries
|
||||
* @return {void}
|
||||
*/
|
||||
function twentytwentyoneDarkModeEditorInit( attempt ) {
|
||||
var container = document.querySelector( '.block-editor__typewriter' ),
|
||||
maxAttempts = 8;
|
||||
|
||||
// Set the initial attempt if it's undefined.
|
||||
attempt = attempt || 0;
|
||||
|
||||
if ( twentytwentyoneIsDarkMode() ) {
|
||||
if ( null === container ) {
|
||||
// Try again.
|
||||
if ( attempt < maxAttempts ) {
|
||||
setTimeout(
|
||||
function() {
|
||||
twentytwentyoneDarkModeEditorInit( attempt + 1 );
|
||||
},
|
||||
// Double the delay, give the server some time to breathe.
|
||||
25 * Math.pow( 2, attempt )
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
document.body.classList.add( 'is-dark-theme' );
|
||||
document.documentElement.classList.add( 'is-dark-theme' );
|
||||
container.classList.add( 'is-dark-theme' );
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
/* global setTimeout */
|
||||
wp.domReady( function() {
|
||||
// Unregister "Wide" Separator Style.
|
||||
wp.blocks.unregisterBlockStyle( 'core/separator', 'wide' );
|
||||
|
||||
// Add to ".block-editor__typewriter" the "is-dark-theme" class if needed.
|
||||
function twentytwentyoneCopyDarkThemeClass() {
|
||||
var editor,
|
||||
attemptDelay = 25,
|
||||
attempt = 0,
|
||||
maxAttempts = 10;
|
||||
|
||||
if ( ! document.body.classList.contains( 'is-dark-theme' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
editor = document.querySelector( '.block-editor__typewriter' );
|
||||
if ( null === editor ) {
|
||||
// Try again.
|
||||
if ( attempt < maxAttempts ) {
|
||||
setTimeout( function() {
|
||||
twentytwentyoneCopyDarkThemeClass();
|
||||
}, attemptDelay );
|
||||
|
||||
// Increment the attempts counter.
|
||||
attempt++;
|
||||
|
||||
// Double the delay, give the server some time to breathe.
|
||||
attemptDelay *= 2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
editor.classList.add( 'is-dark-theme' );
|
||||
}
|
||||
|
||||
twentytwentyoneCopyDarkThemeClass();
|
||||
} );
|
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Script for our custom colorpicker control.
|
||||
*
|
||||
* This is copied from wp-admin/js/customize-controls.js
|
||||
* with a few tweaks:
|
||||
* Removed the hue picker script because we don't use it here
|
||||
* Added the "palettes" argument in wpColorPicker().
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
wp.customize.controlConstructor['twenty-twenty-one-color'] = wp.customize.Control.extend( {
|
||||
ready: function() {
|
||||
var control = this,
|
||||
updating = false,
|
||||
picker;
|
||||
|
||||
picker = this.container.find( '.color-picker-hex' );
|
||||
picker.val( control.setting() ).wpColorPicker( {
|
||||
palettes: control.params.palette,
|
||||
change: function() {
|
||||
updating = true;
|
||||
control.setting.set( picker.wpColorPicker( 'color' ) );
|
||||
updating = false;
|
||||
},
|
||||
clear: function() {
|
||||
updating = true;
|
||||
control.setting.set( '' );
|
||||
updating = false;
|
||||
}
|
||||
} );
|
||||
|
||||
control.setting.bind( function( value ) {
|
||||
// Bail if the update came from the control itself.
|
||||
if ( updating ) {
|
||||
return;
|
||||
}
|
||||
picker.val( value );
|
||||
picker.wpColorPicker( 'color', value );
|
||||
} );
|
||||
|
||||
// Collapse color picker when hitting Esc instead of collapsing the current section.
|
||||
control.container.on( 'keydown', function( event ) {
|
||||
var pickerContainer;
|
||||
if ( 27 !== event.which ) { // Esc.
|
||||
return;
|
||||
}
|
||||
pickerContainer = control.container.find( '.wp-picker-container' );
|
||||
if ( pickerContainer.hasClass( 'wp-picker-active' ) ) {
|
||||
picker.wpColorPicker( 'close' );
|
||||
control.container.find( '.wp-color-result' ).focus();
|
||||
event.stopPropagation(); // Prevent section from being collapsed.
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* File polyfills.js.
|
||||
*
|
||||
* Polyfills for IE11.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Polyfill for Element.closest() because we need to support IE11.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
|
||||
*/
|
||||
if ( ! Element.prototype.matches ) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
|
||||
if ( ! Element.prototype.closest ) {
|
||||
Element.prototype.closest = function( s ) {
|
||||
var el = this;
|
||||
do {
|
||||
if ( Element.prototype.matches.call( el, s ) ) {
|
||||
return el;
|
||||
}
|
||||
el = el.parentElement || el.parentNode;
|
||||
} while ( el !== null && el.nodeType === 1 );
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill for NodeList.foreach() because we need to support IE11.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
||||
*/
|
||||
if ( window.NodeList && ! NodeList.prototype.forEach ) {
|
||||
NodeList.prototype.forEach = function( callback, thisArg ) {
|
||||
var i;
|
||||
thisArg = thisArg || window;
|
||||
for ( i = 0; i < this.length; i++ ) {
|
||||
callback.call( thisArg, this[i], i, this );
|
||||
}
|
||||
};
|
||||
}
|
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* File primary-navigation.js.
|
||||
*
|
||||
* Required to open and close the mobile navigation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Toggle an attribute's value
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
* @param {boolean} withListeners - Whether we want to add/remove listeners or not.
|
||||
*/
|
||||
function twentytwentyoneToggleAriaExpanded( el, withListeners ) {
|
||||
if ( 'true' !== el.getAttribute( 'aria-expanded' ) ) {
|
||||
el.setAttribute( 'aria-expanded', 'true' );
|
||||
twentytwentyoneSubmenuPosition( el.parentElement );
|
||||
if ( withListeners ) {
|
||||
document.addEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside );
|
||||
}
|
||||
} else {
|
||||
el.setAttribute( 'aria-expanded', 'false' );
|
||||
if ( withListeners ) {
|
||||
document.removeEventListener( 'click', twentytwentyoneCollapseMenuOnClickOutside );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function twentytwentyoneCollapseMenuOnClickOutside( event ) {
|
||||
if ( ! document.getElementById( 'site-navigation' ).contains( event.target ) ) {
|
||||
document.getElementById( 'site-navigation' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) {
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the position of submenus so they always fit the screen horizontally.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {Element} li - The li element.
|
||||
*/
|
||||
function twentytwentyoneSubmenuPosition( li ) {
|
||||
var subMenu = li.querySelector( 'ul.sub-menu' ),
|
||||
rect,
|
||||
right,
|
||||
left,
|
||||
windowWidth;
|
||||
|
||||
if ( ! subMenu ) {
|
||||
return;
|
||||
}
|
||||
|
||||
rect = subMenu.getBoundingClientRect();
|
||||
right = Math.round( rect.right );
|
||||
left = Math.round( rect.left );
|
||||
windowWidth = Math.round( window.innerWidth );
|
||||
|
||||
if ( right > windowWidth ) {
|
||||
subMenu.classList.add( 'submenu-reposition-right' );
|
||||
} else if ( document.body.classList.contains( 'rtl' ) && left < 0 ) {
|
||||
subMenu.classList.add( 'submenu-reposition-left' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle clicks on submenu toggles.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
*/
|
||||
function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
|
||||
// Close other expanded items.
|
||||
el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) {
|
||||
if ( button !== el ) {
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
}
|
||||
} );
|
||||
|
||||
// Toggle aria-expanded on the button.
|
||||
twentytwentyoneToggleAriaExpanded( el, true );
|
||||
|
||||
// On tab-away collapse the menu.
|
||||
el.parentNode.querySelectorAll( 'ul > li:last-child > a' ).forEach( function( linkEl ) {
|
||||
linkEl.addEventListener( 'blur', function( event ) {
|
||||
if ( ! el.parentNode.contains( event.relatedTarget ) ) {
|
||||
el.setAttribute( 'aria-expanded', 'false' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
( function() {
|
||||
/**
|
||||
* Menu Toggle Behaviors
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param {string} id - The ID.
|
||||
*/
|
||||
var navMenu = function( id ) {
|
||||
var wrapper = document.body, // this is the element to which a CSS class is added when a mobile nav menu is open
|
||||
mobileButton = document.getElementById( id + '-mobile-menu' ),
|
||||
navMenuEl = document.getElementById( 'site-navigation' );
|
||||
|
||||
// If there's no nav menu, none of this is necessary.
|
||||
if ( ! navMenuEl ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( mobileButton ) {
|
||||
mobileButton.onclick = function() {
|
||||
wrapper.classList.toggle( id + '-navigation-open' );
|
||||
wrapper.classList.toggle( 'lock-scrolling' );
|
||||
twentytwentyoneToggleAriaExpanded( mobileButton );
|
||||
mobileButton.focus();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Trap keyboard navigation in the menu modal.
|
||||
* Adapted from Twenty Twenty.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
document.addEventListener( 'keydown', function( event ) {
|
||||
var modal, elements, selectors, lastEl, firstEl, activeEl, tabKey, shiftKey, escKey;
|
||||
if ( ! wrapper.classList.contains( id + '-navigation-open' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
modal = document.querySelector( '.' + id + '-navigation' );
|
||||
selectors = 'input, a, button';
|
||||
elements = modal.querySelectorAll( selectors );
|
||||
elements = Array.prototype.slice.call( elements );
|
||||
tabKey = event.keyCode === 9;
|
||||
shiftKey = event.shiftKey;
|
||||
escKey = event.keyCode === 27;
|
||||
activeEl = document.activeElement; // eslint-disable-line @wordpress/no-global-active-element
|
||||
lastEl = elements[ elements.length - 1 ];
|
||||
firstEl = elements[0];
|
||||
|
||||
if ( escKey ) {
|
||||
event.preventDefault();
|
||||
wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' );
|
||||
twentytwentyoneToggleAriaExpanded( mobileButton );
|
||||
mobileButton.focus();
|
||||
}
|
||||
|
||||
if ( ! shiftKey && tabKey && lastEl === activeEl ) {
|
||||
event.preventDefault();
|
||||
firstEl.focus();
|
||||
}
|
||||
|
||||
if ( shiftKey && tabKey && firstEl === activeEl ) {
|
||||
event.preventDefault();
|
||||
lastEl.focus();
|
||||
}
|
||||
|
||||
// If there are no elements in the menu, don't move the focus
|
||||
if ( tabKey && firstEl === lastEl ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
} );
|
||||
|
||||
/**
|
||||
* Close menu and scroll to anchor when an anchor link is clicked.
|
||||
* Adapted from Twenty Twenty.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.1
|
||||
*/
|
||||
document.addEventListener( 'click', function( event ) {
|
||||
// If target onclick is <a> with # within the href attribute
|
||||
if ( event.target.hash && event.target.hash.includes( '#' ) ) {
|
||||
wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' );
|
||||
twentytwentyoneToggleAriaExpanded( mobileButton );
|
||||
// Wait 550 and scroll to the anchor.
|
||||
setTimeout(function () {
|
||||
var anchor = document.getElementById(event.target.hash.slice(1));
|
||||
if ( anchor ) {
|
||||
anchor.scrollIntoView();
|
||||
}
|
||||
}, 550);
|
||||
}
|
||||
} );
|
||||
|
||||
navMenuEl.querySelectorAll( '.menu-wrapper > .menu-item-has-children' ).forEach( function( li ) {
|
||||
li.addEventListener( 'mouseenter', function() {
|
||||
this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'true' );
|
||||
twentytwentyoneSubmenuPosition( li );
|
||||
} );
|
||||
li.addEventListener( 'mouseleave', function() {
|
||||
this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'false' );
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
window.addEventListener( 'load', function() {
|
||||
new navMenu( 'primary' );
|
||||
} );
|
||||
}() );
|
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* File responsive-embeds.js.
|
||||
*
|
||||
* Make embeds responsive so they don't overflow their container.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add max-width & max-height to <iframe> elements, depending on their width & height props.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
function twentytwentyoneResponsiveEmbeds() {
|
||||
var proportion, parentWidth;
|
||||
|
||||
// Loop iframe elements.
|
||||
document.querySelectorAll( 'iframe' ).forEach( function( iframe ) {
|
||||
// Only continue if the iframe has a width & height defined.
|
||||
if ( iframe.width && iframe.height ) {
|
||||
// Calculate the proportion/ratio based on the width & height.
|
||||
proportion = parseFloat( iframe.width ) / parseFloat( iframe.height );
|
||||
// Get the parent element's width.
|
||||
parentWidth = parseFloat( window.getComputedStyle( iframe.parentElement, null ).width.replace( 'px', '' ) );
|
||||
// Set the max-width & height.
|
||||
iframe.style.maxWidth = '100%';
|
||||
iframe.style.maxHeight = Math.round( parentWidth / proportion ).toString() + 'px';
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// Run on initial load.
|
||||
twentytwentyoneResponsiveEmbeds();
|
||||
|
||||
// Run on resize.
|
||||
window.onresize = twentytwentyoneResponsiveEmbeds;
|
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* File skip-link-focus-fix.js.
|
||||
*
|
||||
* Helps with accessibility for keyboard only users.
|
||||
*
|
||||
* This is the source file for what is minified in the twenty_twenty_one_skip_link_focus_fix() PHP function.
|
||||
*
|
||||
* Learn more: https://git.io/vWdr2
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
( function() {
|
||||
var isIe = /(trident|msie)/i.test( navigator.userAgent );
|
||||
|
||||
if ( isIe && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
|
||||
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
element = document.getElementById( id );
|
||||
|
||||
if ( element ) {
|
||||
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
}() );
|
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Theme Name: Twenty Twenty-One
|
||||
Theme URI: https://wordpress.org/themes/twentytwentyone/
|
||||
Author: the WordPress team
|
||||
Author URI: https://wordpress.org/
|
||||
Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. With new block patterns, which allow you to create a beautiful layout in a matter of seconds, this theme’s soft colors and eye-catching — yet timeless — design will let your work shine. Take it for a spin! See how Twenty Twenty-One elevates your portfolio, business website, or personal blog.
|
||||
Requires at least: 5.3
|
||||
Tested up to: 6.0
|
||||
Requires PHP: 5.6
|
||||
Version: 1.7
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: twentytwentyone
|
||||
Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready
|
||||
|
||||
Twenty Twenty-One WordPress Theme, (C) 2020 WordPress.org
|
||||
Twenty Twenty-One is distributed under the terms of the GNU GPL.
|
||||
*/
|
@@ -0,0 +1 @@
|
||||
// Do we need to serve a font? Add the @font-face styles here.
|
@@ -0,0 +1,249 @@
|
||||
/* Variables */
|
||||
|
||||
// Vertical Rhythm Multiplier
|
||||
$baseline-unit: 10px;
|
||||
|
||||
:root {
|
||||
|
||||
/* Font Family */
|
||||
--global--font-primary: var(--font-headings, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
|
||||
--global--font-secondary: var(--font-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
|
||||
|
||||
/* Font Size */
|
||||
--global--font-size-base: 1.25rem; // 20px / 16px
|
||||
--global--font-size-xs: 1rem; // 16px / 16px
|
||||
--global--font-size-sm: 1.125rem; // 18px / 16px
|
||||
--global--font-size-md: 1.25rem; // 20px / 16px
|
||||
--global--font-size-lg: 1.5rem; // 24px / 16px
|
||||
--global--font-size-xl: 2.25rem; // 36px / 16px
|
||||
--global--font-size-xxl: 4rem; // 64px / 16px
|
||||
--global--font-size-xxxl: 5rem; // 80px / 16px
|
||||
--global--font-size-page-title: var(--global--font-size-xxl);
|
||||
--global--letter-spacing: normal;
|
||||
|
||||
/* Line Height */
|
||||
--global--line-height-body: 1.7;
|
||||
--global--line-height-heading: 1.3;
|
||||
--global--line-height-page-title: 1.1;
|
||||
|
||||
/* Headings */
|
||||
--heading--font-family: var(--global--font-primary);
|
||||
|
||||
--heading--font-size-h6: var(--global--font-size-xs);
|
||||
--heading--font-size-h5: var(--global--font-size-sm);
|
||||
--heading--font-size-h4: var(--global--font-size-lg);
|
||||
--heading--font-size-h3: calc(1.25 * var(--global--font-size-lg));
|
||||
--heading--font-size-h2: var(--global--font-size-xl);
|
||||
--heading--font-size-h1: var(--global--font-size-page-title);
|
||||
|
||||
--heading--letter-spacing-h6: 0.05em;
|
||||
--heading--letter-spacing-h5: 0.05em;
|
||||
--heading--letter-spacing-h4: var(--global--letter-spacing);
|
||||
--heading--letter-spacing-h3: var(--global--letter-spacing);
|
||||
--heading--letter-spacing-h2: var(--global--letter-spacing);
|
||||
--heading--letter-spacing-h1: var(--global--letter-spacing);
|
||||
|
||||
--heading--line-height-h6: var(--global--line-height-heading);
|
||||
--heading--line-height-h5: var(--global--line-height-heading);
|
||||
--heading--line-height-h4: var(--global--line-height-heading);
|
||||
--heading--line-height-h3: var(--global--line-height-heading);
|
||||
--heading--line-height-h2: var(--global--line-height-heading);
|
||||
--heading--line-height-h1: var(--global--line-height-page-title);
|
||||
|
||||
--heading--font-weight: normal;
|
||||
--heading--font-weight-page-title: 300;
|
||||
--heading--font-weight-strong: 600;
|
||||
|
||||
/* Block: Latest posts */
|
||||
--latest-posts--title-font-family: var(--heading--font-family);
|
||||
--latest-posts--title-font-size: var(--heading--font-size-h3);
|
||||
--latest-posts--description-font-family: var(--global--font-secondary);
|
||||
--latest-posts--description-font-size: var(--global--font-size-sm);
|
||||
|
||||
--list--font-family: var(--global--font-secondary);
|
||||
--definition-term--font-family: var(--global--font-primary);
|
||||
|
||||
/* Colors */
|
||||
--global--color-black: #000;
|
||||
--global--color-dark-gray: #28303d;
|
||||
--global--color-gray: #39414d;
|
||||
--global--color-light-gray: #f0f0f0;
|
||||
--global--color-green: #d1e4dd;
|
||||
--global--color-blue: #d1dfe4;
|
||||
--global--color-purple: #d1d1e4;
|
||||
--global--color-red: #e4d1d1;
|
||||
--global--color-orange: #e4dad1;
|
||||
--global--color-yellow: #eeeadd;
|
||||
--global--color-white: #fff;
|
||||
--global--color-white-50: rgba(255, 255, 255, 0.5); // Used for disabled buttons
|
||||
--global--color-white-90: rgba(255, 255, 255, 0.9); // Used in form fields.
|
||||
|
||||
--global--color-primary: var(--global--color-dark-gray); /* Body text color, site title, footer text color. */
|
||||
--global--color-secondary: var(--global--color-gray); /* Headings */
|
||||
--global--color-primary-hover: var(--global--color-primary);
|
||||
--global--color-background: var(--global--color-green); /* Mint, default body background */
|
||||
--global--color-border: var(--global--color-primary); /* Used for borders (separators) */
|
||||
|
||||
/* Spacing */
|
||||
--global--spacing-unit: #{2 * $baseline-unit}; // 20px
|
||||
--global--spacing-measure: unset; // Use ch units here. ie: 60ch = 60 character max-width
|
||||
--global--spacing-horizontal: #{2.5 * $baseline-unit}; // 25px
|
||||
--global--spacing-vertical: #{3 * $baseline-unit}; // 30px.
|
||||
|
||||
/* Elevation */
|
||||
--global--elevation: 1px 1px 3px 0 rgba(0, 0, 0, 0.2);
|
||||
|
||||
/* Forms */
|
||||
--form--font-family: var(--global--font-secondary);
|
||||
--form--font-size: var(--global--font-size-sm);
|
||||
--form--line-height: var(--global--line-height-body);
|
||||
--form--color-text: var(--global--color-dark-gray); // Text color in input fields is always dark over light background.
|
||||
--form--color-ranged: var(--global--color-secondary);
|
||||
--form--label-weight: 500;
|
||||
--form--border-color: var(--global--color-secondary);
|
||||
--form--border-width: 3px;
|
||||
--form--border-radius: 0;
|
||||
--form--spacing-unit: calc(0.5 * var(--global--spacing-unit));
|
||||
|
||||
/* Cover block */
|
||||
--cover--height: calc(15 * var(--global--spacing-vertical));
|
||||
--cover--color-foreground: var(--global--color-white);
|
||||
--cover--color-background: var(--global--color-black);
|
||||
|
||||
/* Buttons */
|
||||
// Colors
|
||||
--button--color-text: var(--global--color-background);
|
||||
--button--color-text-hover: var(--global--color-secondary);
|
||||
--button--color-text-active: var(--global--color-secondary);
|
||||
--button--color-background: var(--global--color-secondary);
|
||||
--button--color-background-active: var(--global--color-background);
|
||||
// Fonts
|
||||
--button--font-family: var(--global--font-primary);
|
||||
--button--font-size: var(--global--font-size-base);
|
||||
--button--font-weight: 500;
|
||||
--button--line-height: 1.5;
|
||||
// Borders
|
||||
--button--border-width: 3px;
|
||||
--button--border-radius: 0;
|
||||
// Spacing
|
||||
--button--padding-vertical: 15px;
|
||||
--button--padding-horizontal: calc(2 * var(--button--padding-vertical));
|
||||
|
||||
/* entry */
|
||||
--entry-header--color: var(--global--color-primary);
|
||||
--entry-header--color-link: currentColor;
|
||||
--entry-header--color-hover: var(--global--color-primary-hover);
|
||||
--entry-header--color-focus: var(--global--color-secondary);
|
||||
--entry-header--font-size: var(--heading--font-size-h2);
|
||||
--entry-content--font-family: var(--global--font-secondary);
|
||||
--entry-author-bio--font-family: var(--heading--font-family);
|
||||
--entry-author-bio--font-size: var(--heading--font-size-h4);
|
||||
|
||||
/* Header */
|
||||
--branding--color-text: var(--global--color-primary);
|
||||
--branding--color-link: var(--global--color-primary);
|
||||
--branding--color-link-hover: var(--global--color-secondary);
|
||||
--branding--title--font-family: var(--global--font-primary);
|
||||
--branding--title--font-size: var(--global--font-size-lg);
|
||||
--branding--title--font-size-mobile: var(--heading--font-size-h4);
|
||||
--branding--title--font-weight: normal;
|
||||
--branding--title--text-transform: uppercase;
|
||||
--branding--description--font-family: var(--global--font-secondary);
|
||||
--branding--description--font-size: var(--global--font-size-sm);
|
||||
--branding--description--font-family: var(--global--font-secondary);
|
||||
|
||||
--branding--logo--max-width: 300px;
|
||||
--branding--logo--max-height: 100px;
|
||||
--branding--logo--max-width-mobile: 96px;
|
||||
--branding--logo--max-height-mobile: 96px;
|
||||
|
||||
/* Main navigation */
|
||||
--primary-nav--font-family: var(--global--font-secondary);
|
||||
--primary-nav--font-family-mobile: var(--global--font-primary);
|
||||
--primary-nav--font-size: var(--global--font-size-md);
|
||||
--primary-nav--font-size-sub-menu: var(--global--font-size-xs);
|
||||
--primary-nav--font-size-mobile: var(--global--font-size-sm);
|
||||
--primary-nav--font-size-sub-menu-mobile: var(--global--font-size-sm);
|
||||
--primary-nav--font-size-button: var(--global--font-size-xs);
|
||||
--primary-nav--font-style: normal;
|
||||
--primary-nav--font-style-sub-menu-mobile: normal;
|
||||
--primary-nav--font-weight: normal;
|
||||
--primary-nav--font-weight-button: 500;
|
||||
--primary-nav--color-link: var(--global--color-primary);
|
||||
--primary-nav--color-link-hover: var(--global--color-primary-hover);
|
||||
--primary-nav--color-text: var(--global--color-primary);
|
||||
--primary-nav--padding: calc(0.66 * var(--global--spacing-unit));
|
||||
--primary-nav--border-color: var(--global--color-primary);
|
||||
|
||||
/* Pagination */
|
||||
--pagination--color-text: var(--global--color-primary);
|
||||
--pagination--color-link-hover: var(--global--color-primary-hover);
|
||||
--pagination--font-family: var(--global--font-secondary);
|
||||
--pagination--font-size: var(--global--font-size-lg);
|
||||
--pagination--font-weight: normal;
|
||||
--pagination--font-weight-strong: 600;
|
||||
|
||||
/* Footer */
|
||||
--footer--color-text: var(--global--color-primary);
|
||||
--footer--color-link: var(--global--color-primary);
|
||||
--footer--color-link-hover: var(--global--color-primary-hover);
|
||||
--footer--font-family: var(--global--font-primary);
|
||||
--footer--font-size: var(--global--font-size-sm);
|
||||
|
||||
/* Block: Pull quote */
|
||||
--pullquote--font-family: var(--global--font-primary);
|
||||
--pullquote--font-size: var(--heading--font-size-h3);
|
||||
--pullquote--font-style: normal;
|
||||
--pullquote--letter-spacing: var(--heading--letter-spacing-h4);
|
||||
--pullquote--line-height: var(--global--line-height-heading);
|
||||
--pullquote--border-width: 3px;
|
||||
--pullquote--border-color: var(--global--color-primary);
|
||||
--pullquote--color-foreground: var(--global--color-primary);
|
||||
--pullquote--color-background: var(--global--color-background);
|
||||
|
||||
--quote--font-family: var(--global--font-secondary);
|
||||
--quote--font-size: var(--global--font-size-md);
|
||||
--quote--font-size-large: var(--global--font-size-xl);
|
||||
--quote--font-style: normal;
|
||||
--quote--font-weight: 700;
|
||||
--quote--font-weight-strong: bolder;
|
||||
--quote--font-style-large: normal;
|
||||
--quote--font-style-cite: normal;
|
||||
--quote--line-height: var(--global--line-height-body);
|
||||
--quote--line-height-large: 1.35;
|
||||
|
||||
--separator--border-color: var(--global--color-border);
|
||||
--separator--height: 1px;
|
||||
|
||||
/* Block: Table */
|
||||
--table--stripes-border-color: var(--global--color-light-gray);
|
||||
--table--stripes-background-color: var(--global--color-light-gray);
|
||||
--table--has-background-text-color: var(--global--color-dark-gray);
|
||||
|
||||
/* Widgets */
|
||||
--widget--line-height-list: 1.9;
|
||||
--widget--line-height-title: 1.4;
|
||||
--widget--font-weight-title: 700;
|
||||
--widget--spacing-menu: calc(0.66 * var(--global--spacing-unit));
|
||||
|
||||
/* Admin-bar height */
|
||||
--global--admin-bar--height: 0px;
|
||||
}
|
||||
|
||||
.admin-bar {
|
||||
--global--admin-bar--height: 32px;
|
||||
|
||||
@media only screen and (max-width: 782px) {
|
||||
--global--admin-bar--height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 652px) { // Not using the mixin because it's compiled after this file
|
||||
:root {
|
||||
--global--font-size-xl: 2.5rem; // 40px / 16px
|
||||
--global--font-size-xxl: 6rem; // 96px / 16px
|
||||
--global--font-size-xxxl: 9rem; // 144px / 16px
|
||||
--heading--font-size-h3: 2rem; // 32px / 16px
|
||||
--heading--font-size-h2: 3rem; // 48px / 16px
|
||||
}
|
||||
}
|
@@ -0,0 +1,178 @@
|
||||
// Remove the unit of a length
|
||||
// @param {Number} $number - Number to remove unit from
|
||||
// @return {Number} - Unitless number
|
||||
@function strip-unit($number) {
|
||||
@if type-of($number) == "number" and not unitless($number) {
|
||||
@return $number / ($number * 0 + 1);
|
||||
}
|
||||
|
||||
@return $number;
|
||||
}
|
||||
|
||||
// ----
|
||||
// Sass (v3.3.14)
|
||||
// Compass (v1.0.0.rc.1)
|
||||
// ----
|
||||
|
||||
@function pow($x, $y) {
|
||||
$ret: 1;
|
||||
|
||||
@if $y > 0 {
|
||||
@for $i from 1 through $y {
|
||||
$ret: $ret * $x;
|
||||
}
|
||||
} @else {
|
||||
@for $i from $y to 0 {
|
||||
$ret: $ret / $x;
|
||||
}
|
||||
}
|
||||
|
||||
@return $ret;
|
||||
}
|
||||
|
||||
// Map deep get
|
||||
// @author Hugo Giraudel
|
||||
// @access public
|
||||
// @param {Map} $map - Map
|
||||
// @param {Arglist} $keys - Key chain
|
||||
// @return {*} - Desired value
|
||||
//
|
||||
// Example:
|
||||
// $m-breakpoint: map-deep-get($__prefix-default-config, "layouts", "M");
|
||||
@function map-deep-get($map, $keys...) {
|
||||
@each $key in $keys {
|
||||
$map: map-get($map, $key);
|
||||
}
|
||||
@return $map;
|
||||
}
|
||||
|
||||
// Deep set function to set a value in nested maps
|
||||
// @author Hugo Giraudel
|
||||
// @access public
|
||||
// @param {Map} $map - Map
|
||||
// @param {List} $keys - Key chaine
|
||||
// @param {*} $value - Value to assign
|
||||
// @return {Map}
|
||||
//
|
||||
// Example:
|
||||
// $__prefix-default-config: map-deep-set($__prefix-default-config, "layouts" "M", 650px);
|
||||
@function map-deep-set($map, $keys, $value) {
|
||||
$maps: ($map);
|
||||
$result: null;
|
||||
|
||||
// If the last key is a map already
|
||||
// Warn the user we will be overriding it with $value
|
||||
@if type-of(nth($keys, -1)) == "map" {
|
||||
@warn "The last key you specified is a map; it will be overridden with `#{$value}`.";
|
||||
}
|
||||
|
||||
// If $keys is a single key
|
||||
// Just merge and return
|
||||
@if length($keys) == 1 {
|
||||
@return map-merge($map, ($keys: $value));
|
||||
}
|
||||
|
||||
// Loop from the first to the second to last key from $keys
|
||||
// Store the associated map to this key in the $maps list
|
||||
// If the key doesn't exist, throw an error
|
||||
@for $i from 1 through length($keys) - 1 {
|
||||
$current-key: nth($keys, $i);
|
||||
$current-map: nth($maps, -1);
|
||||
$current-get: map-get($current-map, $current-key);
|
||||
@if $current-get == null {
|
||||
@error "Key `#{$key}` doesn't exist at current level in map.";
|
||||
}
|
||||
$maps: append($maps, $current-get);
|
||||
}
|
||||
|
||||
// Loop from the last map to the first one
|
||||
// Merge it with the previous one
|
||||
@for $i from length($maps) through 1 {
|
||||
$current-map: nth($maps, $i);
|
||||
$current-key: nth($keys, $i);
|
||||
$current-val: if($i == length($maps), $value, $result);
|
||||
$result: map-merge($current-map, ($current-key: $current-val));
|
||||
}
|
||||
|
||||
// Return result
|
||||
@return $result;
|
||||
}
|
||||
|
||||
// jQuery-style extend function
|
||||
// - Child themes can use this function to `reset` the values in
|
||||
// config maps without editing the `master` Sass files.
|
||||
// - src: https://www.sitepoint.com/extra-map-functions-sass/
|
||||
// - About `map-merge()`:
|
||||
// - - only takes 2 arguments
|
||||
// - - is not recursive
|
||||
// @param {Map} $map - first map
|
||||
// @param {ArgList} $maps - other maps
|
||||
// @param {Bool} $deep - recursive mode
|
||||
// @return {Map}
|
||||
|
||||
// Examples:
|
||||
|
||||
// $grid-configuration-default: (
|
||||
// 'columns': 12,
|
||||
// 'layouts': (
|
||||
// 'small': 800px,
|
||||
// 'medium': 1000px,
|
||||
// 'large': 1200px,
|
||||
// ),
|
||||
// );
|
||||
|
||||
// $grid-configuration-custom: (
|
||||
// 'layouts': (
|
||||
// 'large': 1300px,
|
||||
// 'huge': 1500px
|
||||
// ),
|
||||
// );
|
||||
|
||||
// $grid-configuration-user: (
|
||||
// 'direction': 'ltr',
|
||||
// 'columns': 16,
|
||||
// 'layouts': (
|
||||
// 'large': 1300px,
|
||||
// 'huge': 1500px
|
||||
// ),
|
||||
// );
|
||||
|
||||
// $deep: false
|
||||
// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user);
|
||||
// --> ("columns": 16, "layouts": (("large": 1300px, "huge": 1500px)), "direction": "ltr")
|
||||
|
||||
// $deep: true
|
||||
// $grid-configuration: map-extend($grid-configuration-default, $grid-configuration-custom, $grid-configuration-user, true);
|
||||
// --> ("columns": 16, "layouts": (("small": 800px, "medium": 1000px, "large": 1300px, "huge": 1500px)), "direction": "ltr")
|
||||
|
||||
@function map-extend($map, $maps.../*, $deep */) {
|
||||
$last: nth($maps, -1);
|
||||
$deep: $last == true;
|
||||
$max: if($deep, length($maps) - 1, length($maps));
|
||||
|
||||
// Loop through all maps in $maps...
|
||||
@for $i from 1 through $max {
|
||||
// Store current map
|
||||
$current: nth($maps, $i);
|
||||
|
||||
// If not in deep mode, simply merge current map with map
|
||||
@if not $deep {
|
||||
$map: map-merge($map, $current);
|
||||
} @else {
|
||||
// If in deep mode, loop through all tuples in current map
|
||||
@each $key, $value in $current {
|
||||
|
||||
// If value is a nested map and same key from map is a nested map as well
|
||||
@if type-of($value) == "map" and type-of(map-get($map, $key)) == "map" {
|
||||
// Recursive extend
|
||||
$value: map-extend(map-get($map, $key), $value, true);
|
||||
}
|
||||
|
||||
// Merge current tuple with map
|
||||
$map: map-merge($map, ($key: $value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@return $map;
|
||||
}
|
@@ -0,0 +1,100 @@
|
||||
// Responsive breakpoints mixin
|
||||
@mixin add_variables( $view: frontend ) {
|
||||
|
||||
@if frontend == $view {
|
||||
|
||||
:root {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if editor == $view {
|
||||
|
||||
:root,
|
||||
body {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Button style
|
||||
// - Applies button styles to blocks and elements that share them.
|
||||
@mixin button-style() {
|
||||
border: var(--button--border-width) solid transparent;
|
||||
border-radius: var(--button--border-radius);
|
||||
cursor: pointer;
|
||||
font-weight: var(--button--font-weight);
|
||||
font-family: var(--button--font-family);
|
||||
font-size: var(--button--font-size);
|
||||
line-height: var(--button--line-height);
|
||||
padding: var(--button--padding-vertical) var(--button--padding-horizontal);
|
||||
text-decoration: none;
|
||||
|
||||
// Standard Button Color Relationship Logic
|
||||
&:not(:hover):not(:active) {
|
||||
|
||||
// Text colors
|
||||
&:not(.has-text-color) {
|
||||
color: var(--global--color-background);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
color: var(--local--color-background, var(--global--color-primary));
|
||||
|
||||
&.has-background {
|
||||
color: var(--global--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Background-colors
|
||||
&:not(.has-background) {
|
||||
background-color: var(--global--color-primary);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
background-color: var(--local--color-primary, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hover Button color should match parent element foreground color
|
||||
&:hover,
|
||||
&:active {
|
||||
background-color: transparent;
|
||||
border-color: currentColor;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
// Focus Button outline color should always match the current text color
|
||||
&:focus {
|
||||
outline-offset: -6px;
|
||||
outline: 2px dotted currentColor;
|
||||
}
|
||||
|
||||
// Disabled Button colors
|
||||
&:disabled {
|
||||
background-color: var(--global--color-white-50);
|
||||
border-color: var(--global--color-white-50);
|
||||
color: var(--button--color-text-active);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin innerblock-margin-clear($container) {
|
||||
|
||||
// Clear the top margin for the first-child.
|
||||
> #{$container} > *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// Last child that is not the appender.
|
||||
> #{$container} > *:last-child:not(.block-list-appender) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
// When selected, the last item becomes the second last because of the appender.
|
||||
&.has-child-selected > #{$container} > *:nth-last-child(2),
|
||||
&.is-selected > #{$container} > *:nth-last-child(2) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,217 @@
|
||||
/**
|
||||
* Responsive Styles
|
||||
*/
|
||||
|
||||
/**
|
||||
* Required Variables
|
||||
*/
|
||||
|
||||
$default_width: 610px;
|
||||
$max_content_width: 1240px;
|
||||
$breakpoint_sm: 482px;
|
||||
$breakpoint_md: 592px;
|
||||
$breakpoint_lg: 652px;
|
||||
$breakpoint_xl: 822px;
|
||||
$breakpoint_xxl: 1024px;
|
||||
|
||||
// Responsive breakpoints mixin
|
||||
@mixin media( $res ) {
|
||||
|
||||
@if mobile-only == $res {
|
||||
@media only screen and (max-width: #{$breakpoint_sm - 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if mobile == $res {
|
||||
@media only screen and (min-width: #{$breakpoint_sm}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if tablet-only == $res {
|
||||
@media only screen and (max-width: #{$breakpoint_md - 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if tablet == $res {
|
||||
@media only screen and (min-width: #{$breakpoint_md}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if laptop-only == $res {
|
||||
@media only screen and (max-width: #{$breakpoint_lg - 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if laptop == $res {
|
||||
@media only screen and (min-width: #{$breakpoint_lg}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if desktop-only == $res {
|
||||
@media only screen and (max-width: #{$breakpoint_xl - 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if desktop == $res {
|
||||
@media only screen and (min-width: #{$breakpoint_xl}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if wide-only == $res {
|
||||
@media only screen and (max-width: #{$breakpoint_xxl - 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@if wide == $res {
|
||||
@media only screen and (min-width: #{$breakpoint_xxl}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Root Media Query Variables
|
||||
*/
|
||||
:root {
|
||||
--responsive--spacing-horizontal: calc(2 * var(--global--spacing-horizontal) * 0.6);
|
||||
--responsive--aligndefault-width: calc(100vw - var(--responsive--spacing-horizontal));
|
||||
--responsive--alignwide-width: calc(100vw - var(--responsive--spacing-horizontal));
|
||||
--responsive--alignfull-width: 100%;
|
||||
--responsive--alignright-margin: var(--global--spacing-horizontal);
|
||||
--responsive--alignleft-margin: var(--global--spacing-horizontal);
|
||||
}
|
||||
|
||||
@include media(mobile) {
|
||||
|
||||
:root {
|
||||
--responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), #{$default_width});
|
||||
--responsive--alignwide-width: calc(100vw - 4 * var(--global--spacing-horizontal));
|
||||
--responsive--alignright-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width)));
|
||||
--responsive--alignleft-margin: calc(0.5 * (100vw - var(--responsive--aligndefault-width)));
|
||||
}
|
||||
}
|
||||
|
||||
@include media(desktop) {
|
||||
|
||||
:root {
|
||||
--responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$default_width});
|
||||
--responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), #{$max_content_width});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends
|
||||
*/
|
||||
%responsive-aligndefault-width {
|
||||
max-width: var(--responsive--aligndefault-width);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
%responsive-alignwide-width {
|
||||
max-width: var(--responsive--alignwide-width);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
%responsive-alignfull-width-mobile {
|
||||
max-width: var(--responsive--alignfull-width);
|
||||
width: var(--responsive--alignfull-width);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@include media(mobile) {
|
||||
%responsive-alignfull-width {
|
||||
max-width: var(--responsive--alignfull-width);
|
||||
width: auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
%responsive-alignwide-width-nested {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: var(--responsive--alignwide-width);
|
||||
max-width: var(--responsive--alignfull-width);
|
||||
}
|
||||
|
||||
%responsive-alignfull-width-nested {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: calc(var(--responsive--alignfull-width) - calc(2 * var(--responsive--spacing-horizontal)));
|
||||
max-width: var(--responsive--alignfull-width);
|
||||
}
|
||||
|
||||
@include media(desktop) {
|
||||
%responsive-alignfull-width-nested {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: calc(var(--responsive--alignfull-width) - calc(4 * var(--responsive--spacing-horizontal)));
|
||||
max-width: var(--responsive--alignfull-width);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
%responsive-alignleft-mobile {
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-left: 0;
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-right: var(--responsive--spacing-horizontal);
|
||||
}
|
||||
|
||||
@include media(mobile) {
|
||||
%responsive-alignleft {
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-left: var(--responsive--alignleft-margin);
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-right: var(--global--spacing-horizontal);
|
||||
}
|
||||
}
|
||||
|
||||
%responsive-alignright-mobile {
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-left: var(--responsive--spacing-horizontal);
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
@include media(mobile) {
|
||||
%responsive-alignright {
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-left: var(--global--spacing-horizontal);
|
||||
|
||||
/*rtl:ignore*/
|
||||
margin-right: var(--responsive--alignright-margin);
|
||||
}
|
||||
}
|
||||
|
||||
// Output
|
||||
.default-max-width {
|
||||
@extend %responsive-aligndefault-width;
|
||||
}
|
||||
|
||||
.wide-max-width {
|
||||
@extend %responsive-alignwide-width;
|
||||
}
|
||||
|
||||
.full-max-width {
|
||||
@extend %responsive-alignfull-width;
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
.clear:before,
|
||||
.clear:after,
|
||||
.entry-content:before,
|
||||
.entry-content:after,
|
||||
.comment-content:before,
|
||||
.comment-content:after,
|
||||
.site-header:before,
|
||||
.site-header:after,
|
||||
.site-content:before,
|
||||
.site-content:after,
|
||||
.site-footer:before,
|
||||
.site-footer:after {
|
||||
content: "";
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.clear:after,
|
||||
.entry-content:after,
|
||||
.comment-content:after,
|
||||
.site-header:after,
|
||||
.site-content:after,
|
||||
.site-footer:after {
|
||||
clear: both;
|
||||
}
|
@@ -0,0 +1,350 @@
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
text-decoration-thickness: 1px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration-style: dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* Reset specific elements to make them easier to style in other contexts.
|
||||
*/
|
||||
|
||||
html,
|
||||
body,
|
||||
p,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
blockquote,
|
||||
figure,
|
||||
fieldset,
|
||||
form,
|
||||
legend,
|
||||
textarea,
|
||||
pre,
|
||||
iframe,
|
||||
hr,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply generic border-box to all elements.
|
||||
* See:
|
||||
* https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
||||
*/
|
||||
|
||||
html {
|
||||
|
||||
/* Apply border-box across the entire page. */
|
||||
box-sizing: border-box;
|
||||
|
||||
// HTML resets
|
||||
font-family: var(--global--font-secondary);
|
||||
line-height: var(--global--line-height-body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Relax the definition a bit, to allow components to override it manually.
|
||||
*/
|
||||
* {
|
||||
|
||||
&,
|
||||
&::before,
|
||||
&::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// body resets
|
||||
body {
|
||||
font-size: var(--global--font-size-base);
|
||||
font-weight: normal;
|
||||
color: var(--global--color-primary);
|
||||
text-align: left;
|
||||
background-color: var(--global--color-background);
|
||||
}
|
||||
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
@@ -0,0 +1,173 @@
|
||||
/**
|
||||
* Site Structure
|
||||
*
|
||||
* - Set vertical margins and responsive widths on
|
||||
* top-level wrappers and content wrappers
|
||||
* - `--global--width-content` is a responsive variable
|
||||
* - See: globals/_global-width-responsive.scss
|
||||
*/
|
||||
|
||||
/**
|
||||
* Top Level Wrappers (header, main, footer)
|
||||
* - Set vertical padding and horizontal margins
|
||||
*/
|
||||
.site-header,
|
||||
.site-main,
|
||||
.widget-area,
|
||||
.site-footer {
|
||||
padding-top: var(--global--spacing-vertical);
|
||||
padding-bottom: var(--global--spacing-vertical);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.site-header {
|
||||
padding-top: calc(0.75 * var(--global--spacing-vertical));
|
||||
padding-bottom: calc(2 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
padding-bottom: calc(3 * var(--global--spacing-vertical));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Site-main children wrappers
|
||||
* - Add double vertical margins here for clearer hierarchy
|
||||
*/
|
||||
.site-main > * {
|
||||
margin-top: calc(3 * var(--global--spacing-vertical));
|
||||
margin-bottom: calc(3 * var(--global--spacing-vertical));
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default maximum responsive content-width
|
||||
*/
|
||||
.default-max-width {
|
||||
@extend %responsive-aligndefault-width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the wide maximum responsive content-width
|
||||
*/
|
||||
.wide-max-width {
|
||||
@extend %responsive-alignwide-width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the full maximum responsive content-width
|
||||
*/
|
||||
.full-max-width {
|
||||
@extend %responsive-alignfull-width-mobile;
|
||||
@extend %responsive-alignfull-width;
|
||||
}
|
||||
|
||||
/*
|
||||
* Block & non-gutenberg content wrappers
|
||||
* - Set margins
|
||||
*/
|
||||
.entry-header,
|
||||
.post-thumbnail,
|
||||
.entry-content,
|
||||
.entry-footer,
|
||||
.author-bio {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-right: auto;
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Block & non-gutenberg content wrapper children
|
||||
* - Sets spacing-vertical margin logic
|
||||
*/
|
||||
.site-main > article > *, // apply vertical margins to article level
|
||||
.site-main > .not-found > *, // apply vertical margins to article level
|
||||
.entry-content > *,
|
||||
[class*="inner-container"] > *,
|
||||
.wp-block-template-part > *,
|
||||
.wp-block-post-template :where(li > *) { // using :where keeps specificity low.
|
||||
|
||||
margin-top: calc(0.666 * var(--global--spacing-vertical));
|
||||
margin-bottom: calc(0.666 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.site-footer > *,
|
||||
.widget-area > * {
|
||||
margin-top: calc(0.666 * var(--global--spacing-vertical));
|
||||
margin-bottom: calc(0.666 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Block & non-gutenberg content wrapper children
|
||||
* - Sets spacing-unit margins
|
||||
*/
|
||||
//.site-header > *, // Removed, to align site title and menu.
|
||||
.entry-header > *,
|
||||
.post-thumbnail > *,
|
||||
.page-content > *,
|
||||
.comment-content > *,
|
||||
.widget > * {
|
||||
margin-top: var(--global--spacing-unit);
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* .entry-content children specific controls
|
||||
* - Adds special margin overrides for alignment utility classes
|
||||
*/
|
||||
.entry-content > * {
|
||||
|
||||
&.alignleft,
|
||||
&.alignright,
|
||||
&.alignleft:first-child + *,
|
||||
&.alignright:first-child + *,
|
||||
&.alignfull.has-background {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child,
|
||||
&.alignfull.has-background {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Reset alignleft and alignright margins after alignfull */
|
||||
&.alignfull + .alignleft,
|
||||
&.alignfull + .alignright {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
blockquote {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: var(--global--spacing-vertical) 0 var(--global--spacing-vertical) var(--global--spacing-horizontal);
|
||||
|
||||
> * {
|
||||
margin-top: var(--global--spacing-unit);
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
letter-spacing: var(--heading--letter-spacing-h4);
|
||||
font-family: var(--quote--font-family);
|
||||
font-size: var(--quote--font-size);
|
||||
font-style: var(--quote--font-style);
|
||||
font-weight: var(--quote--font-weight);
|
||||
line-height: var(--quote--line-height);
|
||||
}
|
||||
|
||||
cite,
|
||||
footer {
|
||||
font-weight: normal;
|
||||
color: var(--global--color-primary);
|
||||
font-size: var(--global--font-size-xs);
|
||||
letter-spacing: var(--global--letter-spacing);
|
||||
}
|
||||
|
||||
&.alignleft,
|
||||
&.alignright {
|
||||
|
||||
padding-left: inherit;
|
||||
|
||||
p {
|
||||
font-size: var(--heading--font-size-h5);
|
||||
max-width: inherit;
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
cite,
|
||||
footer {
|
||||
font-size: var(--global--font-size-xs);
|
||||
letter-spacing: var(--global--letter-spacing);
|
||||
}
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: var(--quote--font-weight-strong);
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "\201C";
|
||||
font-size: var(--quote--font-size);
|
||||
line-height: var(--quote--line-height);
|
||||
position: absolute;
|
||||
left: calc(-0.5 * var(--global--spacing-horizontal));
|
||||
}
|
||||
|
||||
.wp-block-quote__citation,
|
||||
cite,
|
||||
footer {
|
||||
color: var(--global--color-primary);
|
||||
font-size: var(--global--font-size-xs);
|
||||
font-style: var(--quote--font-style-cite);
|
||||
}
|
||||
|
||||
@include media(mobile-only) {
|
||||
padding-left: calc(0.5 * var(--global--spacing-horizontal));
|
||||
|
||||
&:before {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
select,
|
||||
select:focus {
|
||||
border: var(--form--border-width) solid var(--form--border-color);
|
||||
border-radius: var(--form--border-radius);
|
||||
color: var(--form--color-text);
|
||||
font-size: var(--form--font-size);
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit);
|
||||
background: var(--global--color-white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2328303d'><polygon points='0,0 10,0 5,5'/></svg>") no-repeat; // stylelint-disable-line function-url-quotes
|
||||
background-position: right var(--form--spacing-unit) top 60%;
|
||||
}
|
@@ -0,0 +1,329 @@
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="url"],
|
||||
input[type="password"],
|
||||
input[type="search"],
|
||||
input[type="number"],
|
||||
input[type="tel"],
|
||||
input[type="date"],
|
||||
input[type="month"],
|
||||
input[type="week"],
|
||||
input[type="time"],
|
||||
input[type="datetime"],
|
||||
input[type="datetime-local"],
|
||||
input[type="color"],
|
||||
.site textarea {
|
||||
border: var(--form--border-width) solid var(--form--border-color);
|
||||
border-radius: var(--form--border-radius);
|
||||
color: var(--form--color-text);
|
||||
line-height: var(--global--line-height-body);
|
||||
padding: var(--form--spacing-unit);
|
||||
// Gives a little more space for the outline offset.
|
||||
margin: 0 2px;
|
||||
max-width: 100%;
|
||||
|
||||
&:focus {
|
||||
color: var(--form--color-text);
|
||||
outline-offset: 2px;
|
||||
outline: 2px dotted var(--form--border-color);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.is-dark-theme & {
|
||||
background: var(--global--color-white-90);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the negative offset from normalize to make the thicker "border" work on focus.
|
||||
input[type="search"] {
|
||||
|
||||
&:focus {
|
||||
outline-offset: -7px;
|
||||
|
||||
.is-dark-theme & {
|
||||
outline-color: var(--global--color-background);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="color"] {
|
||||
padding: calc(var(--form--spacing-unit) / 2);
|
||||
height: calc(4 * var(--form--spacing-unit));
|
||||
}
|
||||
|
||||
input[type="email"],
|
||||
input[type="url"] {
|
||||
|
||||
/*rtl:ignore*/
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
select {
|
||||
border: var(--form--border-width) solid var(--form--border-color);
|
||||
color: var(--form--color-text);
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
line-height: var(--global--line-height-body);
|
||||
padding: var(--form--spacing-unit) calc(3 * var(--form--spacing-unit)) var(--form--spacing-unit) var(--form--spacing-unit);
|
||||
background: var(--global--color-white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2328303d'><polygon points='0,0 10,0 5,5'/></svg>") no-repeat; // stylelint-disable-line function-url-quotes
|
||||
background-position: right var(--form--spacing-unit) top 60%;
|
||||
|
||||
&:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px dotted var(--form--border-color);
|
||||
}
|
||||
|
||||
.is-dark-theme & {
|
||||
background: var(--global--color-white-90) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2328303d'><polygon points='0,0 10,0 5,5'/></svg>") no-repeat; // stylelint-disable-line function-url-quotes
|
||||
background-position: right var(--form--spacing-unit) top 60%;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: var(--form--font-size);
|
||||
font-weight: var(--form--label-weight);
|
||||
margin-bottom: calc(var(--global--spacing-vertical) / 3);
|
||||
}
|
||||
|
||||
/**
|
||||
https://css-tricks.com/custom-styling-form-inputs-with-modern-css-features/
|
||||
https://codepen.io/aaroniker/pen/ZEYoxEY by Aaron Iker.
|
||||
License: MIT.
|
||||
*/
|
||||
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
position: relative;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border: var(--form--border-width) solid var(--form--border-color);
|
||||
background: var(--global--color-white);
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.is-dark-theme & {
|
||||
background: var(--global--color-white-90);
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
|
||||
&:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px dotted var(--form--border-color);
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
opacity: 0;
|
||||
display: block;
|
||||
left: 5px;
|
||||
top: 2px;
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
height: 13px;
|
||||
border: 3px solid var(--form--color-text);
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
|
||||
&:checked {
|
||||
color: var(--form--color-text);
|
||||
|
||||
&:after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"] {
|
||||
border-radius: 50%;
|
||||
|
||||
&:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px dotted var(--form--border-color);
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
opacity: 0;
|
||||
display: block;
|
||||
left: 3px;
|
||||
top: 3px;
|
||||
position: absolute;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
background: var(--form--color-text);
|
||||
}
|
||||
|
||||
&:checked {
|
||||
border: 4px solid var(--form--border-color);
|
||||
|
||||
&:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// Focus style for checked radio buttons.
|
||||
&:focus {
|
||||
outline-offset: 4px;
|
||||
outline: 2px dotted var(--form--border-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"] + label,
|
||||
input[type="radio"] + label {
|
||||
display: inline-block;
|
||||
padding-left: 10px;
|
||||
font-size: var(--global--font-size-xs);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/
|
||||
*/
|
||||
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
|
||||
|
||||
input[type="range"] {
|
||||
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
|
||||
width: 100%; /* Specific width is required for Firefox. */
|
||||
height: 6px;
|
||||
background: var(--form--color-ranged);
|
||||
border-radius: 6px;
|
||||
outline-offset: 10px;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="range"]::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
border: 3px solid var(--form--color-ranged);
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
border-radius: 50%;
|
||||
background: var(--global--color-background);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="range"]::-moz-range-thumb {
|
||||
border: 3px solid var(--form--color-ranged);
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
border-radius: 50%;
|
||||
background: var(--global--color-background);
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="range"]::-ms-track {
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
border-radius: 6px;
|
||||
border-width: 19px 0;
|
||||
border-color: var(--global--color-background);
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type="range"]::-ms-fill-upper {
|
||||
background: var(--form--color-ranged);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
input[type="range"]::-ms-fill-lower {
|
||||
background: var(--form--color-ranged);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
input[type="range"]::-ms-thumb {
|
||||
border: 3px solid var(--form--color-ranged);
|
||||
height: 44px;
|
||||
width: 44px;
|
||||
border-radius: 50%;
|
||||
background: var(--global--color-background);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
display: grid;
|
||||
border-color: var(--global--color-secondary);
|
||||
padding: var(--global--spacing-horizontal);
|
||||
|
||||
legend {
|
||||
font-size: var(--global--font-size-lg);
|
||||
}
|
||||
|
||||
input {
|
||||
|
||||
&[type="submit"] {
|
||||
max-width: max-content;
|
||||
}
|
||||
|
||||
&:not([type="submit"]) {
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
}
|
||||
|
||||
&[type="radio"],
|
||||
&[type="checkbox"] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&[type="radio"] + label,
|
||||
&[type="checkbox"] + label {
|
||||
font-size: var(--form--font-size);
|
||||
padding-left: 0;
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::-moz-placeholder { // Firefox 19+
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.post-password-message {
|
||||
font-size: var(--global--font-size-lg);
|
||||
}
|
||||
|
||||
.post-password-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&__label {
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
input[type="password"] {
|
||||
flex-grow: 1;
|
||||
margin-top: calc(var(--global--spacing-vertical) / 3);
|
||||
margin-right: calc(0.66 * var(--global--spacing-horizontal));
|
||||
}
|
||||
|
||||
&__submit {
|
||||
margin-top: calc(var(--global--spacing-vertical) / 3);
|
||||
@include media(tablet) {
|
||||
margin-left: calc(0.4 * var(--global--spacing-horizontal));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* text-underline-offset doesn't work in Chrome at all 👎
|
||||
* But looks nice in Safari/Firefox, so let's keep it and
|
||||
* maybe Chrome will support it soon.
|
||||
*/
|
||||
a {
|
||||
cursor: pointer;
|
||||
color: var(--wp--style--color--link, var(--global--color-primary));
|
||||
text-underline-offset: 3px;
|
||||
text-decoration-skip-ink: all;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration-style: dotted;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) {
|
||||
|
||||
/* Only visible in Windows High Contrast mode */
|
||||
outline: 2px solid transparent;
|
||||
|
||||
text-decoration: underline 1px dotted currentColor;
|
||||
text-decoration-skip-ink: none;
|
||||
background: rgba(255, 255, 255, .9);
|
||||
|
||||
// Change text color when the body background is dark.
|
||||
.is-dark-theme & {
|
||||
background: var(--global--color-black);
|
||||
color: var(--global--color-white);
|
||||
text-decoration: none;
|
||||
|
||||
.meta-nav {
|
||||
color: var(--wp--style--color--link, var(--global--color-white));
|
||||
}
|
||||
}
|
||||
|
||||
// Change colors when the body background is white.
|
||||
.has-background-white & {
|
||||
background: rgba(0, 0, 0, .9);
|
||||
color: var(--wp--style--color--link, var(--global--color-white));
|
||||
|
||||
.meta-nav {
|
||||
color: var(--wp--style--color--link, var(--global--color-white));
|
||||
}
|
||||
}
|
||||
|
||||
&.skip-link {
|
||||
|
||||
/* Only visible in Windows High Contrast mode */
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: -2px;
|
||||
|
||||
&:focus {
|
||||
color: #21759b;
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
}
|
||||
|
||||
&.custom-logo-link {
|
||||
background: none;
|
||||
}
|
||||
|
||||
img {
|
||||
outline: 2px dotted var(--wp--style--color--link, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
|
||||
// Enforce the custom link color even if a custom background color has been set.
|
||||
// The extra specificity here is required to override the background color styles.
|
||||
.has-background {
|
||||
// Target both current level and nested block.
|
||||
.has-link-color a,
|
||||
&.has-link-color a {
|
||||
color: var(--wp--style--color--link, var(--global--color-primary));
|
||||
}
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
img {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Classic editor images */
|
||||
.entry-content img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Make sure embeds and iframes fit their containers. */
|
||||
embed,
|
||||
iframe,
|
||||
object,
|
||||
video {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Media captions */
|
||||
figcaption,
|
||||
.wp-caption,
|
||||
.wp-caption-text,
|
||||
.wp-block-embed figcaption {
|
||||
color: currentColor;
|
||||
font-size: var(--global--font-size-xs);
|
||||
line-height: var(--global--line-height-body);
|
||||
margin-top: calc(0.5 * var(--global--spacing-unit));
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
text-align: center;
|
||||
|
||||
.alignleft &,
|
||||
.alignright & {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* WP Smiley */
|
||||
.page-content .wp-smiley,
|
||||
.entry-content .wp-smiley,
|
||||
.comment-content .wp-smiley {
|
||||
border: none;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
/* Over here, place any elements that do not need to have their own file. */
|
||||
b,
|
||||
strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dfn,
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre;
|
||||
overflow-x: auto;
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
// Variable Configuration
|
||||
// - Import all config files for display in
|
||||
// the editor, customizer, and front end.
|
||||
|
||||
|
||||
@import "separator/config";
|
||||
@import "utilities/config";
|
@@ -0,0 +1,7 @@
|
||||
.wp-block-audio {
|
||||
|
||||
audio:focus {
|
||||
outline-offset: 5px;
|
||||
outline: 2px solid var(--global--color-primary);
|
||||
}
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
// Block Styles for the Editor
|
||||
// - These styles replace key Gutenberg Block styles for fonts, colors, and
|
||||
// spacing with CSS-variables overrides in the Block Editor
|
||||
// - In the future the Block styles may get compiled to individual .css
|
||||
// files and conditionally loaded
|
||||
|
||||
@import "button/editor";
|
||||
@import "code/editor";
|
||||
@import "cover/editor";
|
||||
@import "columns/editor";
|
||||
@import "file/editor";
|
||||
@import "gallery/editor";
|
||||
@import "group/editor";
|
||||
@import "heading/editor";
|
||||
@import "html/editor";
|
||||
@import "image/editor";
|
||||
@import "latest-comments/editor";
|
||||
@import "latest-posts/editor";
|
||||
@import "legacy/editor"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc.
|
||||
@import "list/editor";
|
||||
@import "media-text/editor";
|
||||
@import "navigation/editor";
|
||||
@import "paragraph/editor";
|
||||
@import "preformatted/editor";
|
||||
@import "pullquote/editor";
|
||||
@import "query-loop/editor";
|
||||
@import "quote/editor";
|
||||
@import "rss/editor";
|
||||
@import "search/editor";
|
||||
@import "separator/editor";
|
||||
@import "social-icons/editor";
|
||||
@import "table/editor";
|
||||
@import "tag-clould/editor";
|
||||
@import "verse/editor";
|
||||
@import "utilities/font-sizes";
|
||||
@import "utilities/editor"; // Import LAST to cascade properly
|
@@ -0,0 +1,37 @@
|
||||
// Blocks
|
||||
// - These styles replace key Gutenberg Block styles with font, color, and
|
||||
// spacing with CSS-variables overrides
|
||||
// - In the future the Block styles may get compiled to individual .css
|
||||
// files and conditionally loaded
|
||||
|
||||
@import "audio/style";
|
||||
@import "button/style";
|
||||
@import "code/style";
|
||||
@import "columns/style";
|
||||
@import "cover/style";
|
||||
@import "file/style";
|
||||
@import "gallery/style";
|
||||
@import "group/style";
|
||||
@import "heading/style";
|
||||
@import "image/style";
|
||||
@import "latest-comments/style";
|
||||
@import "latest-posts/style";
|
||||
@import "legacy/style"; // "Blocks" from the legacy WP editor, ie: galleries, .button class, etc.
|
||||
@import "list/style";
|
||||
@import "media-text/style";
|
||||
@import "navigation/style";
|
||||
@import "paragraph/style";
|
||||
@import "preformatted/style";
|
||||
@import "pullquote/style";
|
||||
@import "query-loop/style";
|
||||
@import "quote/style";
|
||||
@import "rss/style";
|
||||
@import "search/style";
|
||||
@import "separator/style";
|
||||
@import "social-icons/style";
|
||||
@import "table/style";
|
||||
@import "tag-clould/style";
|
||||
@import "verse/style";
|
||||
@import "video/style";
|
||||
@import "utilities/font-sizes";
|
||||
@import "utilities/style"; // Import LAST to cascade properly
|
@@ -0,0 +1,126 @@
|
||||
.wp-block-button__link {
|
||||
// Extend button style
|
||||
@include button-style();
|
||||
}
|
||||
|
||||
/**
|
||||
* Block Options
|
||||
*/
|
||||
|
||||
.wp-block-button {
|
||||
|
||||
// Target the default and filled button states.
|
||||
&:not(.is-style-outline) {
|
||||
|
||||
.wp-block-button__link:not(:hover):not(:active) {
|
||||
|
||||
// Text colors
|
||||
&:not(.has-text-color) {
|
||||
color: var(--global--color-background);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
color: var(--local--color-background, var(--global--color-background));
|
||||
|
||||
&.has-background {
|
||||
color: var(--global--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Background-colors
|
||||
&:not(.has-background) {
|
||||
background-color: var(--global--color-primary);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
background-color: var(--local--color-primary, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hover Button color should match parent element foreground color
|
||||
.wp-block-button__link:hover,
|
||||
.wp-block-button__link:active {
|
||||
border-color: currentColor !important;
|
||||
background-color: transparent !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
// Remove :focus styles in the editor
|
||||
.wp-block-button__link:focus {
|
||||
outline-offset: inherit;
|
||||
outline: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Outline Style.
|
||||
&.is-style-outline {
|
||||
|
||||
.wp-block-button__link:not(:hover):not(:active) {
|
||||
|
||||
// Border colors
|
||||
&:not(.has-text-color),
|
||||
&:not(.has-background),
|
||||
&.has-background {
|
||||
border-color: currentColor;
|
||||
}
|
||||
|
||||
// Text colors
|
||||
&:not(.has-text-color) {
|
||||
color: var(--global--color-primary);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
color: var(--local--color-primary, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
|
||||
&.has-background {
|
||||
// Nested
|
||||
.has-background &:not(.has-text-color) {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Background-colors
|
||||
&:not(.has-background) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
// Hover Button color should match default button style
|
||||
.wp-block-button__link:hover,
|
||||
.wp-block-button__link:active {
|
||||
|
||||
background-color: var(--global--color-primary) !important;
|
||||
border-color: transparent !important;
|
||||
color: var(--global--color-background) !important;
|
||||
|
||||
.has-background & {
|
||||
background-color: var(--local--color-primary, var(--global--color-primary)) !important;
|
||||
color: var(--local--color-background, var(--global--color-background)) !important;
|
||||
}
|
||||
|
||||
.has-text-color & {
|
||||
color: var(--local--color-background, var(--global--color-background)) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove :focus styles in the editor
|
||||
.wp-block-button__link:focus {
|
||||
outline-offset: inherit;
|
||||
outline: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Squared Style
|
||||
&.is-style-squared {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.is-style-outline .wp-block-button__link[style*="radius"],
|
||||
.wp-block-button__link[style*="radius"] {
|
||||
outline-offset: 2px;
|
||||
}
|
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* Button
|
||||
*/
|
||||
.site .button,
|
||||
button,
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
.wp-block-search .wp-block-search__button,
|
||||
.wp-block-button .wp-block-button__link,
|
||||
.wp-block-file a.wp-block-file__button {
|
||||
// Extend button style
|
||||
@include button-style();
|
||||
}
|
||||
|
||||
/**
|
||||
* Block Options
|
||||
*/
|
||||
.wp-block-button {
|
||||
|
||||
// Target the default and filled button states.
|
||||
&:not(.is-style-outline) {
|
||||
|
||||
.wp-block-button__link:not(:hover):not(:active) {
|
||||
|
||||
// Text colors
|
||||
&:not(.has-text-color) {
|
||||
color: var(--global--color-background);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
color: var(--local--color-background, var(--global--color-background));
|
||||
|
||||
&.has-background {
|
||||
color: var(--global--color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Background-colors
|
||||
&:not(.has-background) {
|
||||
background-color: var(--global--color-primary);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
background-color: var(--local--color-primary, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hover Button color should match parent element foreground color
|
||||
.wp-block-button__link:hover,
|
||||
.wp-block-button__link:active {
|
||||
border-color: currentColor !important;
|
||||
background-color: transparent !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Outline Style.
|
||||
&.is-style-outline {
|
||||
|
||||
.wp-block-button__link:not(:hover):not(:active) {
|
||||
|
||||
// Border colors
|
||||
&:not(.has-text-color),
|
||||
&:not(.has-background),
|
||||
&.has-background {
|
||||
border-color: currentColor;
|
||||
}
|
||||
|
||||
// Text colors
|
||||
&:not(.has-text-color) {
|
||||
color: var(--global--color-primary);
|
||||
|
||||
// Nested
|
||||
.has-background & {
|
||||
color: var(--local--color-primary, var(--global--color-primary));
|
||||
}
|
||||
}
|
||||
|
||||
&.has-background {
|
||||
// Nested
|
||||
.has-background &:not(.has-text-color) {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Background-colors
|
||||
&:not(.has-background) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-button__link:hover,
|
||||
.wp-block-button__link:active {
|
||||
|
||||
border-color: transparent !important;
|
||||
background-color: var(--global--color-primary) !important;
|
||||
color: var(--global--color-background) !important;
|
||||
|
||||
.has-background & {
|
||||
background-color: var(--local--color-primary, var(--global--color-primary)) !important;
|
||||
color: var(--local--color-background, var(--global--color-background)) !important;
|
||||
}
|
||||
|
||||
.has-text-color & {
|
||||
color: var(--local--color-background, var(--global--color-background)) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Squared Style
|
||||
.is-style-squared .wp-block-button__link {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.is-style-outline .wp-block-button__link[style*="radius"]:focus,
|
||||
.wp-block-button a.wp-block-button__link[style*="radius"]:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px dotted var(--button--color-background);
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
.wp-block-code code {
|
||||
white-space: pre !important;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.wp-block-code {
|
||||
border-color: var(--global--color-border);
|
||||
border-radius: 0;
|
||||
border-style: solid;
|
||||
border-width: 0.1rem;
|
||||
padding: var(--global--spacing-unit);
|
||||
color: currentColor;
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
.wp-block-code {
|
||||
border-color: var(--global--color-border);
|
||||
border-radius: 0;
|
||||
border-style: solid;
|
||||
border-width: 0.1rem;
|
||||
padding: var(--global--spacing-unit);
|
||||
|
||||
code {
|
||||
color: var(--global--color-primary);
|
||||
white-space: pre;
|
||||
overflow-x: auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
@@ -0,0 +1,68 @@
|
||||
.wp-block-columns {
|
||||
|
||||
&:not(.alignwide):not(.alignfull) {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.wp-block,
|
||||
.wp-block-column {
|
||||
// Allow Gutenberg to set the width of a block that lives inside the columns block.
|
||||
max-width: inherit;
|
||||
}
|
||||
|
||||
@include innerblock-margin-clear(".wp-block-column");
|
||||
|
||||
&.is-style-twentytwentyone-columns-overlap {
|
||||
|
||||
@include media(laptop) {
|
||||
|
||||
.wp-block-column:nth-child(2n) {
|
||||
margin-left: calc(-2 * var(--global--spacing-horizontal));
|
||||
margin-top: calc(2.5 * var(--global--spacing-horizontal));
|
||||
z-index: 2;
|
||||
|
||||
// Provide text-based child blocks with a default background color to ensure they're readable.
|
||||
> p,
|
||||
> h1,
|
||||
> h2,
|
||||
> h3,
|
||||
> h4,
|
||||
> h5,
|
||||
> h6,
|
||||
> ul,
|
||||
> ol,
|
||||
> pre {
|
||||
|
||||
&:not(.has-background) {
|
||||
background-color: var(--global--color-background);
|
||||
padding: var(--global--spacing-unit);
|
||||
}
|
||||
}
|
||||
|
||||
// Lists should still have their usual left padding.
|
||||
> ul:not(.has-background),
|
||||
> ol:not(.has-background) {
|
||||
padding-left: calc(2 * var(--global--spacing-horizontal));
|
||||
}
|
||||
|
||||
&.is-vertically-aligned-center {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block[data-align="full"] > & {
|
||||
|
||||
p:not(.has-background),
|
||||
h1:not(.has-background),
|
||||
h2:not(.has-background),
|
||||
h3:not(.has-background),
|
||||
h4:not(.has-background),
|
||||
h5:not(.has-background),
|
||||
h6:not(.has-background) {
|
||||
padding-left: var(--global--spacing-unit);
|
||||
padding-right: var(--global--spacing-unit);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,105 @@
|
||||
.wp-block-columns {
|
||||
|
||||
&:not(.alignwide):not(.alignfull) {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.wp-block-column {
|
||||
|
||||
> * {
|
||||
margin-top: calc(0.66 * var(--global--spacing-vertical));
|
||||
margin-bottom: calc(0.66 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-column:not(:last-child) {
|
||||
margin-bottom: calc(0.66 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
}
|
||||
|
||||
@include media(desktop) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-style-twentytwentyone-columns-overlap {
|
||||
|
||||
justify-content: space-around;
|
||||
|
||||
@include media(laptop) {
|
||||
|
||||
.wp-block-column {
|
||||
|
||||
&:nth-child(2n) {
|
||||
margin-left: calc(-2 * var(--global--spacing-horizontal));
|
||||
margin-top: calc(2.5 * var(--global--spacing-horizontal));
|
||||
z-index: 2;
|
||||
|
||||
// Provide text-based child blocks with a default background color to ensure they're readable.
|
||||
> p,
|
||||
> h1,
|
||||
> h2,
|
||||
> h3,
|
||||
> h4,
|
||||
> h5,
|
||||
> h6,
|
||||
> ul,
|
||||
> ol,
|
||||
> pre {
|
||||
|
||||
&:not(.has-background) {
|
||||
background-color: var(--global--color-background);
|
||||
padding: var(--global--spacing-unit);
|
||||
}
|
||||
}
|
||||
|
||||
// Lists should still have their usual left padding.
|
||||
> ul:not(.has-background),
|
||||
> ol:not(.has-background) {
|
||||
padding-left: calc(2 * var(--global--spacing-horizontal));
|
||||
}
|
||||
|
||||
&.is-vertically-aligned-center {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.alignfull {
|
||||
|
||||
.wp-block-column {
|
||||
|
||||
p:not(.has-background),
|
||||
h1:not(.has-background),
|
||||
h2:not(.has-background),
|
||||
h3:not(.has-background),
|
||||
h4:not(.has-background),
|
||||
h5:not(.has-background),
|
||||
h6:not(.has-background) {
|
||||
padding-left: var(--global--spacing-unit);
|
||||
padding-right: var(--global--spacing-unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
.wp-block-file {
|
||||
|
||||
.wp-block-file__textlink {
|
||||
text-decoration: underline;
|
||||
text-decoration-style: solid;
|
||||
text-decoration-thickness: 1px;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-file__button {
|
||||
// Extend button style
|
||||
@include button-style();
|
||||
display: inline-block;
|
||||
|
||||
// Remove :focus styles in the editor
|
||||
&:focus {
|
||||
outline-offset: inherit;
|
||||
outline: inherit;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
.wp-block-file {
|
||||
|
||||
// Undo Gutenberg hover defaults
|
||||
a.wp-block-file__button:active,
|
||||
a.wp-block-file__button:focus,
|
||||
a.wp-block-file__button:hover {
|
||||
opacity: inherit;
|
||||
}
|
||||
|
||||
a.wp-block-file__button {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
.wp-block-gallery {
|
||||
|
||||
figcaption {
|
||||
margin-bottom: 0;
|
||||
|
||||
a {
|
||||
color: var(--global--color-white);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
.wp-block-gallery {
|
||||
|
||||
margin: 0 auto;
|
||||
|
||||
.blocks-gallery-image,
|
||||
.blocks-gallery-item {
|
||||
|
||||
// On mobile and responsive viewports, we allow only 1 or 2 columns at the most.
|
||||
width: calc((100% - var(--global--spacing-unit)) / 2);
|
||||
|
||||
figcaption {
|
||||
margin: 0;
|
||||
// Text color is always white to account for default gradient background
|
||||
color: var(--global--color-white);
|
||||
font-size: var(--global--font-size-xs);
|
||||
|
||||
a {
|
||||
color: var(--global--color-white);
|
||||
|
||||
&:focus {
|
||||
background-color: transparent;
|
||||
outline: 2px solid var(--wp--style--color--link, var(--global--color-primary));
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a:focus img {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
.wp-block-group {
|
||||
// Start IE clearfix.
|
||||
// This hack is only necessary because we want to support IE11.
|
||||
// If we don't want to support IE11, then "display: flow-root" would suffice.
|
||||
display: block;
|
||||
clear: both;
|
||||
|
||||
display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
// End IE clearfix.
|
||||
|
||||
&.has-background {
|
||||
padding: var(--global--spacing-vertical);
|
||||
|
||||
[data-align="full"] & {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Block Styles
|
||||
&.is-style-twentytwentyone-border {
|
||||
border: calc(3 * var(--separator--height)) solid var(--global--color-border);
|
||||
padding: var(--global--spacing-vertical);
|
||||
|
||||
.wp-block-group__inner-container > [data-align="full"] {
|
||||
max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical)));
|
||||
width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical)));
|
||||
margin-left: calc(-1 * var(--global--spacing-vertical));
|
||||
}
|
||||
}
|
||||
|
||||
@include innerblock-margin-clear(".wp-block-group__inner-container");
|
||||
}
|
||||
|
||||
.wp-block-group .wp-block-group.has-background > .block-editor-block-list__layout > [data-align="full"] {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
.wp-block-group {
|
||||
// Start IE clearfix.
|
||||
// This hack is only necessary because we want to support IE11.
|
||||
// If we don't want to support IE11, then "display: flow-root" would suffice.
|
||||
display: block;
|
||||
clear: both;
|
||||
|
||||
display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
// End IE clearfix.
|
||||
|
||||
.wp-block-group__inner-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
> * {
|
||||
margin-top: calc(0.666 * var(--global--spacing-vertical));
|
||||
margin-bottom: calc(0.666 * var(--global--spacing-vertical));
|
||||
|
||||
&.alignfull {
|
||||
@extend %responsive-alignfull-width-mobile;
|
||||
}
|
||||
|
||||
@include media(mobile) {
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.has-background {
|
||||
padding: calc(0.666 * var(--global--spacing-vertical));
|
||||
|
||||
@include media(mobile) {
|
||||
padding: var(--global--spacing-vertical);
|
||||
}
|
||||
}
|
||||
|
||||
// Block Styles
|
||||
&.is-style-twentytwentyone-border {
|
||||
border: calc(3 * var(--separator--height)) solid var(--global--color-border);
|
||||
padding: var(--global--spacing-vertical);
|
||||
}
|
||||
|
||||
// Adjust alignfull items to account for left and right padding.
|
||||
&.has-background,
|
||||
&.is-style-twentytwentyone-border {
|
||||
|
||||
.wp-block-group__inner-container > .alignfull,
|
||||
.wp-block-group__inner-container > hr.wp-block-separator:not(.is-style-dots):not(.alignwide).alignfull {
|
||||
max-width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical)));
|
||||
width: calc(var(--responsive--alignfull-width) + (2 * var(--global--spacing-vertical)));
|
||||
margin-left: calc(-1 * var(--global--spacing-vertical));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,81 @@
|
||||
.wp-block-heading h1,
|
||||
h1,
|
||||
.h1,
|
||||
.wp-block-heading h2,
|
||||
h2,
|
||||
.h2,
|
||||
.wp-block-heading h3,
|
||||
h3,
|
||||
.h3,
|
||||
.wp-block-heading h4,
|
||||
h4,
|
||||
.h4,
|
||||
.wp-block-heading h5,
|
||||
h5,
|
||||
.h5,
|
||||
.wp-block-heading h6,
|
||||
h6,
|
||||
.h6 {
|
||||
clear: both;
|
||||
font-family: var(--heading--font-family);
|
||||
font-weight: var(--heading--font-weight);
|
||||
|
||||
strong {
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
}
|
||||
|
||||
&[style*="--wp--typography--line-height"] {
|
||||
line-height: var(--wp--typography--line-height, var(--global--line-height-body));
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-heading h1,
|
||||
h1,
|
||||
.h1 {
|
||||
font-size: var(--heading--font-size-h1);
|
||||
letter-spacing: var(--heading--letter-spacing-h1);
|
||||
line-height: var(--heading--line-height-h1);
|
||||
}
|
||||
|
||||
.wp-block-heading h2,
|
||||
h2,
|
||||
.h2 {
|
||||
font-size: var(--heading--font-size-h2);
|
||||
letter-spacing: var(--heading--letter-spacing-h2);
|
||||
line-height: var(--heading--line-height-h2);
|
||||
}
|
||||
|
||||
.wp-block-heading h3,
|
||||
h3,
|
||||
.h3 {
|
||||
font-size: var(--heading--font-size-h3);
|
||||
letter-spacing: var(--heading--letter-spacing-h3);
|
||||
line-height: var(--heading--line-height-h3);
|
||||
}
|
||||
|
||||
.wp-block-heading h4,
|
||||
h4,
|
||||
.h4 {
|
||||
font-size: var(--heading--font-size-h4);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h4);
|
||||
line-height: var(--heading--line-height-h4);
|
||||
}
|
||||
|
||||
.wp-block-heading h5,
|
||||
h5,
|
||||
.h5 {
|
||||
font-size: var(--heading--font-size-h5);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h5);
|
||||
line-height: var(--heading--line-height-h5);
|
||||
}
|
||||
|
||||
.wp-block-heading h6,
|
||||
h6,
|
||||
.h6 {
|
||||
font-size: var(--heading--font-size-h6);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h6);
|
||||
line-height: var(--heading--line-height-h6);
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
h1,
|
||||
.h1,
|
||||
h2,
|
||||
.h2,
|
||||
h3,
|
||||
.h3,
|
||||
h4,
|
||||
.h4,
|
||||
h5,
|
||||
.h5,
|
||||
h6,
|
||||
.h6 {
|
||||
clear: both;
|
||||
font-family: var(--heading--font-family);
|
||||
font-weight: var(--heading--font-weight);
|
||||
|
||||
strong {
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
.h1 {
|
||||
font-size: var(--heading--font-size-h1);
|
||||
letter-spacing: var(--heading--letter-spacing-h1);
|
||||
line-height: var(--heading--line-height-h1);
|
||||
}
|
||||
|
||||
h2,
|
||||
.h2 {
|
||||
font-size: var(--heading--font-size-h2);
|
||||
letter-spacing: var(--heading--letter-spacing-h2);
|
||||
line-height: var(--heading--line-height-h2);
|
||||
}
|
||||
|
||||
h3,
|
||||
.h3 {
|
||||
font-size: var(--heading--font-size-h3);
|
||||
letter-spacing: var(--heading--letter-spacing-h3);
|
||||
line-height: var(--heading--line-height-h3);
|
||||
}
|
||||
|
||||
h4,
|
||||
.h4 {
|
||||
font-size: var(--heading--font-size-h4);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h4);
|
||||
line-height: var(--heading--line-height-h4);
|
||||
}
|
||||
|
||||
h5,
|
||||
.h5 {
|
||||
font-size: var(--heading--font-size-h5);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h5);
|
||||
line-height: var(--heading--line-height-h5);
|
||||
}
|
||||
|
||||
h6,
|
||||
.h6 {
|
||||
font-size: var(--heading--font-size-h6);
|
||||
font-weight: var(--heading--font-weight-strong);
|
||||
letter-spacing: var(--heading--letter-spacing-h6);
|
||||
line-height: var(--heading--line-height-h6);
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
[data-type="core/html"] textarea {
|
||||
// Make sure that the color is not white on white when a dark body background is used.
|
||||
color: var(--global--color-dark-gray);
|
||||
border-radius: 0;
|
||||
padding: var(--global--spacing-unit);
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
/* Center image block by default in the editor */
|
||||
|
||||
.wp-block-image,
|
||||
.wp-block-image > div:not(.components-placeholder) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
[data-type="core/image"] .block-editor-block-list__block-edit figure.is-resized {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Block Styles */
|
||||
|
||||
.wp-block-image.is-style-twentytwentyone-border img,
|
||||
.wp-block-image.is-style-twentytwentyone-image-frame img {
|
||||
border: calc(3 * var(--separator--height)) solid var(--global--color-border);
|
||||
}
|
||||
|
||||
.wp-block-image.is-style-twentytwentyone-image-frame img {
|
||||
padding: var(--global--spacing-unit);
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
.wp-block-image {
|
||||
text-align: center;
|
||||
|
||||
figcaption {
|
||||
color: var(--global--color-primary);
|
||||
font-size: var(--global--font-size-xs);
|
||||
line-height: var(--global--line-height-body);
|
||||
margin-top: calc(0.5 * var(--global--spacing-unit));
|
||||
margin-bottom: var(--global--spacing-unit);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.alignright {
|
||||
margin-left: var(--global--spacing-horizontal);
|
||||
}
|
||||
|
||||
.alignleft {
|
||||
margin-right: var(--global--spacing-horizontal);
|
||||
}
|
||||
|
||||
a:focus img {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove vertical margins from image block wrappers when floated
|
||||
.entry-content > *[class="wp-block-image"],
|
||||
.entry-content [class*="inner-container"] > *[class="wp-block-image"] {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
||||
// Remove top margins from the following element when previous image block is floated
|
||||
+ * {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Block Styles
|
||||
.wp-block-image.is-style-twentytwentyone-border img,
|
||||
.wp-block-image.is-style-twentytwentyone-image-frame img {
|
||||
border: calc(3 * var(--separator--height)) solid var(--global--color-border);
|
||||
}
|
||||
|
||||
.wp-block-image.is-style-twentytwentyone-image-frame img {
|
||||
padding: var(--global--spacing-unit);
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
|
||||
> .wp-block-image {
|
||||
|
||||
> .alignleft,
|
||||
> .alignright {
|
||||
@include media(mobile) {
|
||||
max-width: 50%;
|
||||
}
|
||||
@include media(mobile-only) {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
.wp-block-latest-comments {
|
||||
padding-left: 0;
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
.wp-block-latest-comments {
|
||||
padding-left: 0;
|
||||
|
||||
.wp-block-latest-comments__comment {
|
||||
font-size: var(--global--font-size-sm);
|
||||
line-height: var(--global--line-height-body);
|
||||
|
||||
/* Vertical margins logic */
|
||||
margin-top: var(--global--spacing-vertical);
|
||||
margin-bottom: var(--global--spacing-vertical);
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wp-block-latest-comments__comment-meta {
|
||||
font-family: var(--heading--font-family);
|
||||
}
|
||||
|
||||
.wp-block-latest-comments__comment-date {
|
||||
color: var(--global--color-primary);
|
||||
font-size: var(--global--font-size-sm);
|
||||
}
|
||||
|
||||
.wp-block-latest-comments__comment-excerpt p {
|
||||
font-size: var(--global--font-size-sm);
|
||||
line-height: var(--global--line-height-body);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user