MoreRSS

site icon1A23 Studio修改

由 Eana Hufwe 创建的个人工作室。
请复制 RSS 到你的阅读器,或快速订阅到 :

Inoreader Feedly Follow Feedbin Local Reader

1A23 Studio的 RSS 预览

Holpxay Calculator

2026-02-09 04:25:38

holpxay n. [hol.ˈp’aj] number.

A notepad calculator where math just works. Type expressions, see results instantly.

Features

Arithmetic & Numbers

  • Basic math with +-*/^!mod, and parentheses
  • Alternative operators: ×·÷
  • Percentages (50%200 * 15%), scientific notation, underscore separators
  • Hex (0xFF), binary (0b1010), octal (0o777), arbitrary bases (ABC base 16)
  • Built-in constants (piephi) and functions (sincossqrtlogroundabsrandom, …)

Units & Conversions

  • 200+ built-in units across length, mass, time, temperature, data, energy, power, pressure, frequency, angle, and more
  • Automatic cross-unit arithmetic: 5 km + 500 m100 ft^2 + 5 m^2
  • Derived units: 60 km/h9.8 m/s^250 watts per square meter
  • Composite values: 5 ft 7 in2 hr 30 min 15 sec
  • Flexible conversion syntax: toinas->
  • Composite conversion targets: 171 cm to ft in
  • User-defined units: 150 apples / 30 apples/day

Date & Time

  • Date literals, relative dates (today3 days ago2 weeks from now)
  • Time values in 12h/24h format
  • Date arithmetic: now + 100 days2038 Jan 19 - today
  • Timezone conversions: 18:30 Tokyonow in London, UTC offsets
  • Unix timestamps: 1700000000 unix
  • Property extraction: today to weekdaynow to hour

Currency

  • ISO codes, symbols, and names with live exchange rates
  • Arithmetic and conversion: 100 USD + 50 EUR100 USD to JPY
  • Derived currency units: 150 USD/person * 4 person

Variables & Conditionals

  • Variable assignment: price = 49.99
  • Boolean expressions: comparisons, &&||!
  • Conditionals: if 5 > 3 then 100 else 200
  • Bitwise operations: &|xor~<<>>

Output Formats

  • Number bases (to hexto binary), fractions, scientific notation, percentages, ordinals
  • Precision control: pi to 2 decimals12345 to 3 sig figs
  • Date/time formats: ISO 8601, RFC 2822, RFC 9557, unix timestamps

Editor

  • Markdown headings and inline comments (#)
  • GFM syntax highlighting alongside live calculations
  • Customizable themes, fonts, number/date formatting, and more

Trivia

This app is 70% written by Claude Opus 4.6 with constant human supervision and intervension.

Initally it was planned to be written 90+% by Claude, but I had to jump in and change the direction of deployment mid-way due to the way it has complicated the architecture.

Holpxay Calculator appeared first on 1A23 Studio.

Font coverage analyzer

2026-01-13 00:25:58

A web tool to check codepoint / glyph coverages of a font. Capable of checking coverage of the following collections:

  • Codepoints
    • Unicode Blocks
    • Unicode Script Extensions
    • China Encodings (GB/T 2312, GB/T 12345, GBK)
    • China Foundries (方正字库, 汉仪字库)
    • China Standards (《通用规范汉字表》, 《义务教育语文课程常用字表》, 《现代汉语常用字表》, 《现代汉语通用字表》, 《古籍印刷通用字規範字形表》)
    • Japan Encodings (JIS X 0208, JIS X 0212, JIS X 0213:2004, Shift-JIS)
    • Japan JIS (JIS 第一水準, JIS 第二水準, JIS 第三水準, JIS 第四水準)
    • Japan Kyoiku Kanji (学年別漢字配当表)
    • Japan Kanken (日本漢字能力検定 級別漢字表)
    • Japan Joyo Kanji (常用漢字, 人名用漢字)
    • Taiwan Encodings (Big5)
    • Taiwan Standards (《常用國字標準字體表》, 《次常用國字標準字體表》, 《臺灣客家語常用詞辭典》, 《臺灣閩南語常用詞辭典》)
    • Hong Kong (《常用字字形表》, 《香港小學學習字詞表》, 《香港增補字符集》, 《常用香港外字表》)
    • Korean Encodings (Code page 949, KS X 1001)
  • Glyphs (unstable)
    • Adobe Latin
    • Adobe Greek
    • Adobe Cyrillic
    • Adobe Arabic
    • Adobe CMAP (Adobe CNS1-7, Adobe GB1-6, Adobe Japan1-7, Adobe KR-9, Adobe Manga1-0)
    • GF Latin
    • GF Greek
    • GF Cyrillic
    • GF Arabic
    • GF Phonetics
    • GF TransLatin
    • JF (jf 7000 當務字集)

Font coverage analyzer appeared first on 1A23 Studio.

Progress Bar Labels with CSS Anchor Positioning

2025-11-29 12:38:40

Here’s a small but fun use case for CSS Anchor Positioning, using it to keep multiple labels around a progress bar readable, without touching JavaScript.

The goal is simple: we have a horizontal progress bar with three labels: one on the left, one on the right, and one that should follow the progress “tip”. We want that center label to sit as close as possible to the current progress, but never overlap with either side label.

To make things easier, we’ll assume:

  • Only the center label needs to move dynamically, the side labels stay at their ends.
  • The progress bar is wide enough to fit all three labels with some spacing.
CodePen Embed Fallback

Describing the layout as rules

Instead of hard-coding coordinates, it helps to think in terms of a small set of layout rules the browser can try in order.

For the center label, the logic can be written as:

  1. Try placing the center label to the left of the progress tip, with a margin.
  2. If that would overlap something, try placing it to the right of the progress tip, also with a margin.
  3. If the tip is already too close to another label, place the center label next to that label instead, with a wider margin to keep everything readable.

CSS Anchor Positioning is very good at this style of “try a few positions until one fits” layout. The @position-try at-rules let us declare those strategies explicitly and let the browser pick whichever one does not collide with the container or other constraints.

In this example, I use three named anchors:

  • --prog-bar: the progress bar itself (specifically, its right edge as the “tip”)
  • --left-label: the fixed label on the left
  • --right-label: the fixed label on the right.

The moving center label is then positioned relative to these anchors.

Defining @position-try strategies

Here are the two position-try rules that implement the logic above:

@position-try --bar-left {
position-area: none;
right: max(
calc(anchor(--prog-bar right) + var(--container-padding)),
calc(anchor(--right-label left) + var(--label-gap))
);
margin-left: calc(
var(--container-padding) + anchor-size(--left-label width) +
var(--label-gap)
);
}
@position-try --bar-right {
position-area: none;
left: max(
calc(anchor(--prog-bar right) + var(--container-padding)),
calc(anchor(--left-label right) + var(--label-gap))
);
margin-right: calc(
var(--label-gap) + anchor-size(--right-label width) +
var(--container-padding)
);
}

Conceptually:

  • --bar-left corresponds to “try to sit just to the left of the progress tip”.
  • --bar-right corresponds to “otherwise, sit just to the right of the progress tip”.

The “third rule” (move next to whichever label is closer) is effectively folded into the max() expressions:

  • For right / left we take the maximum of:
    • the tip position plus container padding, and
    • the neighbouring label plus a label gap.

This means:

  • If there’s plenty of room, the center label hugs the progress tip.
  • If the tip is about to collide with a side label, the center label gets pushed away so that it sits beside that label instead, maintaining at least var(--label-gap) of space.

Avoiding overlap with anchor-size()

The margins are where the overlap-avoidance really happens.

Take this line as an example:

margin-left: calc(
var(--container-padding) + anchor-size(--left-label width) +
var(--label-gap)
);

Here we:

  • Read the actual width of the left label via anchor-size(--left-label width).
  • Add the container’s padding and a label gap.
  • Use that as the center label’s margin, so its text always clears the left label by at least that gap.

In other words, instead of guessing spacing with hard-coded numbers, we attach the spacing directly to the real measured size of the anchors. That’s exactly the kind of thing anchor-size() is designed for.

The same idea is used for margin-right with the right label.

Putting it together

Once the @position-try rules are defined, the center label simply opts in to them, for example:

.label.center {
position: absolute;
top: var(--container-padding);
position-try: --bar-left, --bar-right;
position-anchor: --prog-bar;
position-area: left;
}

The browser will then:

  1. Try --bar-left.
  2. If that would cause an overlap or violate constraints, fall back to --bar-right.

Combined with the max() insets and anchor-size()-based margins, that’s enough to:

  • Keep the center label near the progress tip,
  • Prevent it from overlapping either side label,
  • Adjust spacing automatically if label text length changes,
  • Do all of this with zero JavaScript.

The full implementation – including the anchors and layout container – is in the CodePen embed above.

Browser support

CSS Anchor Positioning is still relatively new, and support is rolling out across browsers. Before using this technique in production, it’s worth checking current support status or adding a progressive enhancement fallback.

You can use the Baseline widget below to see the latest support details for anchor positioning across engines, and upvote the feature you want to see become interoperable across major browsers:

Progress Bar Labels with CSS Anchor Positioning appeared first on 1A23 Blog.

TRMNL recipies

2025-10-19 05:52:50

A bundle of recipes I wrote for TRMNL, an e-ink dashboard display.

Wikipedia Article of the Day

A TRMNL plugin that fetches and displays the Wikipedia article of the day in multiple languages.

Random Unicode

A random Unicode codepoint on each refresh. Data powered by codepoints.net.

Random MDN Article

A random MDN Web article on each refresh.

World clock

A digital world clock shows up to 7 time zones. Inspired by World Time Buddy and Windows 11 World Clock.

Lyricova Quote

Show a random quote from Lyricova on each refresh.

Random Zi

A random CJKV ideograph with pronunciations, definitions, and regional glyphs on each refresh. Data powered by zi.tools 字統网.

Random Google Fonts

A random typeface from Google Fonts on each refresh.

Public Recipe Stats

Shows connection statistics of public recipes. You can choose to show the latest, search for keywords, show your own recipes, or show selected recipe IDs. Data powered by TRMNL Recipes API.

Tatoeba

A random sentence in your chosen languages with translations. Data powered by Tatoeba.

Slickdeals Frontpage

Slickdeals Frontpage and Popular deals. Data from Slickdeals RSS feed.

Word Clock 日本語

Word clock in Japanese. Supports 24-hour and 12-hour formats, with a maximum display precision of 5 minutes (depending on recipe and device update frequency).

Word Clock 中文

Word Clock in Chinese. Supports 24-hour and 12-hour formats, as well as Simplified and Traditional Chinese. The highest precision is 5 minutes (determined by the plugin and device refresh rate).

Sunrise and Sunset Chart

Sunrise and sunset time with a daily and yearly chart.

TRMNL recipies appeared first on 1A23 Studio.

Rotated Background Patterns in CSS with SVG

2025-03-07 05:18:49

While working on the WordPress theme Tìtsyul Amip Twenty Twenty-Five, a need arose for a more flexible way to implement rotated background patterns in CSS. Existing methods often involve trade-offs, and this exploration led to a technique leveraging the power of SVG.

Existing Approaches and Their Limitations

Traditionally, achieving rotated background images in CSS has involved several workarounds, each with its own set of challenges:

  • CSS Transforms: Using the transform: rotate() property. This rotates the entire element, including its content, which is often not the desired outcome.
  • Pseudo-elements: Employing ::before or ::after pseudo-elements to create a rotated background. While this allows rotating the background independently of the content, it can be complex to manage sizing and positioning. Additionally, if the html or body elements have a background color, pseudo-elements with a negative z-index may fall behind them.
  • Pre-rotated Images: Rotating the image using image editing software and then using the rotated image as the background. This is impractical for seamless patterns in most rotation angles or when dynamic canvas size is required.
CodePen Embed Fallback

The SVG Pattern Technique

Building on these insights, let’s now explore a method that leverages SVG to achieve rotated background patterns—a solution that delivers both flexibility and precise control.

At the core of this approach is the SVG <pattern> feature, a versatile tool that enables the creation of seamless, repeating background patterns. The <pattern> element defines a tileable area that can be used as a fill for other SVG shapes, allowing for intricate and scalable designs. By leveraging attributes such as patternTransform, you can easily manipulate these patterns with transformations like rotation, scaling, and translation, making it an ideal choice for dynamic and responsive backgrounds.

Draw the Pattern Using SVG Begin by creating the desired pattern using SVG elements. This can include vector graphics or embedded bitmaps.

<polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2" />

Wrap in a <pattern> Definition Encapsulate the pattern within a <pattern> element inside the <defs> section of the SVG, specify the dimensions for the pattern, and use the patternTransform attribute to apply transformations, such as rotation.

<defs>
<pattern id="star" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(20)">
<polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2" />
</pattern>
</defs>

Create the Main SVG Create a new SVG element without a viewBox attribute. Set the width and height to 100% to ensure it covers the entire area of the element. Then add a <rect> element to cover the entire SVG area, and set its fill attribute to reference the pattern defined in step 2.

<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
<defs>
<pattern id="star" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(20)">
<polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2" />
</pattern>
</defs>
<rect width="100%" height="100%" fill="url(#star)" />
</svg>

Encode and Use in CSS Encode the SVG as a data URL. Use the data URL as the background-image in your CSS.

div {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cdefs%3E%3Cpattern id='star' width='10' height='10' patternUnits='userSpaceOnUse' patternTransform='rotate(20)'%3E%3Cpolygon points='0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2' /%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23star)' /%3E%3C/svg%3E");
}

Using this technique, the pattern background can be transformed on its own, while still behave like any other CSS background to enjoy other features like background stacking and blend mode settings.

This is an example of how a background using this technique could look like.

SVG Rotated Background Generator

You can also try it out using the generator below to create custom rotated background patterns with SVG. You can also adjust parameters such as pattern size, scaling, and rotation angle.

CodePen Embed Fallback

Rotated Background Patterns in CSS with SVG appeared first on 1A23 Blog.