The essential news about content management systems and mobile technology. Powered by Perfect Publisher and XT Search for Algolia.
The News Site publishes posts to the following channels: Facebook, Instagram, Twitter, Telegram, Web Push, Tumblr, and Blogger.
Today we’re announcing the next version of the Tailwind CSS Typography plugin, which brings easy dark
mode support, a brand new customization API, and the
not-prose
class I wasn’t sure we’d ever figure out how
to support.
Today we’re announcing the next version of the Tailwind CSS Typography plugin, which brings easy dark
mode support, a brand new customization API, and the
not-prose
class I wasn’t sure we’d ever figure out how
to support.
For a full tour of everything that’s new, check out the official release video on our YouTube channel.
Tailwind CSS Typography v0.5 is designed for Tailwind CSS v3.0, so make sure you’re on the latest version of Tailwind, then install the new plugin release from npm:
npm install -D @tailwindcss/typography@latest
To learn more about everything the plugin provides, check out our update typography plugin documentation.
We’ve added a prose-invert
class you can use to
easily swap out your typography colors in dark mode:
<body class="bg-white dark:bg-gray-900">
<article class="prose dark:prose-invert">
{{ markdown }}
</article>
</body>
The dark themes are hand-crafted by our expert design team, and automatically adapt to whatever gray scale you’re using.
Tailwind CSS v3.0 ships with five different sets of grays by default, and the updated typography plugin includes classes for each one, making it easy to match your typography to the rest of your site:
<article class="prose prose-slate">
{{ markdown }}
</article>
We’ve simplified how we define color themes internally too, which makes it easier to add your own if you need to.
Check out the documentation to learn more.
We’ve added tons of modifiers you can use to tweak specific elements in your prose styles, directly in your HTML:
<article class="prose prose-img:rounded-xl prose-headings:underline prose-a:text-blue-600">
{{ markdown }}
</article>
This makes it easy to do things like style links to match your brand, add a border radius to images, and tons more.
Check out the element modifiers documentation to learn more.
Ever needed to stick some non-content HTML in the middle of your
content? Now you can wrap that with not-prose
to make
sure the prose styles don’t interfere with it:
<article class="prose">
<h1>My Heading</h1>
<p>...</p>
<div class="not-prose">
<!-- Some HTML that needs to be prose-free -->
</div>
<p>...</p>
<!-- ... -->
</article>
Ready to try it out? Check out the typography plugin documentation to learn more and get started.
(The post Effortless Typography, Even in Dark Mode appeared first on Tailwind CSS Blog.)
Read more https://tailwindcss.com/blog/tailwindcss-typography-v0-5
The post Laravel Geographical Calculator appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
Read more https://laravel-news.com/laravel-geographical-calculator
Tailwind CSS is written in JavaScript and distributed as an npm package, which means you’ve always had to have Node.js and npm installed to use it.
Today we’re announcing a new standalone CLI build that gives you the full power of Tailwind CLI in a self-contained executable — no Node.js or npm required.
Tailwind CSS is written in JavaScript and distributed as an npm package, which means you’ve always had to have Node.js and npm installed to use it.
This has made it harder to integrate into projects where using npm isn’t always common, and with tools like Rails and Phoenix both moving away from npm by default, we needed to find a way for people to use Tailwind in these projects without forcing them to adopt an entirely separate ecosystem of tooling.
Today we’re announcing a new standalone CLI build that gives you the full power of Tailwind CLI in a self-contained executable — no Node.js or npm required.
To install it, grab the executable for your platform from the latest release on GitHub, making sure to give it executable permissions:
# Example for macOS arm64
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 tailwindcss
Now you can use it just like our npm-distributed CLI tool:
# Create a tailwind.config.js file
./tailwindcss init
# Start a watcher
./tailwindcss -i input.css -o output.css --watch
# Compile and minify your CSS for production
./tailwindcss -i input.css -o output.css --minify
We’ve even bundled the latest versions of all of our first-party
plugins, so if you want to use them in your project, just
require
them in your tailwind.config.js
file like you would in a Node-based project:
module.exports = {
// ...
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
]
}
You get all the power of our standard npm-distributed CLI in a convenient, portable package — no dependencies required.
We didn’t rewrite Tailwind in Rust or anything (yet…) — we’re actually using pkg, a really cool project by Vercel that lets you turn a Node.js project into an executable that can be run without installing Node.js by bundling all of the parts your project needs right into the executable itself.
This is what makes it possible for you to still use a
tailwind.config.js
file with the full power of
JavaScript, rather than a static format like JSON.
If you are already using npm in your project, use the npm-distributed version of our CLI that we’ve always provided. It’s simpler to update, the file size is smaller, and you’re already in the ecosystem anyways — there’s no benefit at all to using the standalone build.
If on the other hand you’re working on a project where you don’t
otherwise need Node.js or npm, the standalone build can be a great
choice. If Tailwind was the only reason you had a
package.json
file, this is probably going to feel like
a nicer solution.
(The post Standalone CLI: Use Tailwind CSS without Node.js appeared first on Tailwind CSS Blog.)
Read more https://tailwindcss.com/blog/standalone-cli
In a few short days, you’ll surely be asked: What are your New Year’s resolutions for 2022? If starting a blogging habit is one of them, we’re here to help! At WordPress.com, we’re trying something new for 2022. Instead of individual New Year’s resolutions, we’ll be focusing on a shared goal we can accomplish together.
We’re running a month-long blogging challenge in January and we invite you to join us! Each day, you’ll receive a new writing prompt to inspire you to publish a post on your blog. There is no right or wrong way to respond to the prompts. Take this opportunity to exercise your creativity and have fun. Maybe you’ll choose to respond with a story, a drawing, a poem, a photo, a comic strip, a recipe, or even a playlist. Anything goes!
By participating in Bloganuary, you’ll join bloggers around the world in the shared goal of creating and/or solidifying a strong blogging habit. You’ll get access to the Bloganuary community site where you can meet and get to know others working toward similar goals. You can share tips, learn from others, reach a new audience for your blog, and make some new blogging friends.
Here’s a badge you can add to your blog to show others what you’re doing and encourage them to join in the fun.
Join the Bloganuary challenge, stay motivated, and start the new year off on the write track!
Do you want to learn more before you join Bloganuary? Read about the challenge here.
Read more https://wordpress.com/blog/2021/12/16/new-year-new-success-with-bloganuary/
The post Laravel 8.76 Released appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
Read more https://laravel-news.com/laravel-8-76-0