Not Your Typical Horizontal Rules

Category Image 052

The default browser style for <hr> is so weird. It’s basically:

border-style: inset;
border-width: 1px;

The default border-color is black, but the border doesn’t actually look black, because the inset border “adds a split tone to the line that makes the element appear slightly depressed.”

If I kick up the border-width to 40px you can see it more clearly:

I often reset an <hr> to be “just a line” and it always gets me because I’ll try something, like height: 1px with a background at first, but that’s not right. The easier way to clear it is to turn off all the borders then only use border-top or border-bottom. Or, turn off all the borders, set a height, and use a background.

Annnyway… Sara has some of the nicest horizontal rules in town on the current design of her site, and she’s written it all up. Guess what? They aren’t even <hr> elements! It turns out the only styling hook you have is CSS, which wasn’t as adaptive as Sara needed, so she ended up with a <div role="separator"> (TIL!) and inline SVG.

The best way to get the full flexibility of an SVG is by inlining it. But the <hr> element is content-less — it has no opening and closing tags within which you can place other elements.

The only way to work around the limitations of <hr> while preserving semantics for screen reader users is to use a div and provide the semantics of an hr using ARIA.

Direct Link to ArticlePermalink


The post Not Your Typical Horizontal Rules appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

How to handle “statement label must be unique” in Marie assembler

558fe5180e0e8fc922d31c23ef84d240

here is my code...

JnS Print
            Halt

Print, HEX 2
PrintString, Load PrintName
Skipcond 800
JumpI Print
Output
Clear
Load PrintName
Add Increment
Store PrintName
Clear
Jump PrintString

PrintName, DEC 0
HEX 043
HEX 048
HEX 045
HEX 041
HEX 048
HEX 030
HEX 030
HEX 030
Increment, DEC 1
Load PrintName
Store Print_Arg
JnS Print
Halt
PrintName, hex 04A

Print_Arg, DEC 0
Print, Hex 0
Load Print_Arg
Output
Skipcond 000
JumpI Print
Output
Clear
Load PrintName
Add Increment
Store PrintName
Clear
Jump 0

Increment, DEC 1

read a closed Excel.xlsx file

558fe5180e0e8fc922d31c23ef84d240

I wish to read from a closed excel file, a few years ago I found a website using ADO and it worked
but now I cannot find this website I have tried over 100 with no success

please help
Ernest

Countdown timer using LC3 Assembly Langugae

558fe5180e0e8fc922d31c23ef84d240

I want to make a timer that will countdown from a number that a user will give such as 20 min. If it is easier I could use the timer as a set amount each time. I want the timer to countdown from 20:00 down to 00:00 (min:sec). I want users to be able to pause and start the time by pressing a s for start and a p for pause. If you have any questions let me know, any help will be greatly appreciated.

May I Know where is my mistake

558fe5180e0e8fc922d31c23ef84d240
#include<iostream>
using namespace std;
int main()
{
  string weekday;
  weekday= {"Mon","Tue","Wed", "Thu","Fri"};
  cout<<"\n Please select day of booking:";
  cin>>weekday;
  cout<<"\n Day of booking:";

  return 0;
}

Building a Settings Component

Category Image 052

This is a tremendous CSS-focused tutorial from Adam Argyle. I really like the “just for gap” concept here. Grid is extremely powerful, but you don’t have to use all its abilities every time you reach for it. Here, Adam reaches for it for very light reasons like using it as an in-between border alternative as well as more generic spacing. I guess he’s putting money where his mouth is in terms of gap superseding margin!

I also really like calling out Una Kravet’s awesome name for flexible grids: RAM. Perhaps you’ve seen the flexible-number-of-columns trick with CSS grid? The bonus trick here (which I first saw from Evan Minto) is to use min(). That way, not only are large layouts covered, but even the very smallest layouts have no hard-coded minimum (like if 100% is smaller than 10ch here):

.el {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10ch, 100%), 35ch));
}

There is a ton more trickery in the blog post. The “color pops” with :focus-within is fun and clever. So much practical CSS in building something so practical! 🧡 more blog posts like this, please. Fortunately, we don’t have to wait, as Adam has other component-focused posts like this one on Tabs and this one on Sidenav.

Direct Link to ArticlePermalink


The post Building a Settings Component appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

A simple encryption scheme

558fe5180e0e8fc922d31c23ef84d240

Basically this scheme uses variable offsets, but it generates the bytes on the fly. They aren't truly random, but there aren't any obvious patterns and the output passes all the NIST tests.

Since a simple password can be used to do the de/encryption it is much easier to hand off to the recipient and any good password generator can create one.

Since only part of the generated sub keys are used, it becomes very difficult if not impossible to reverse engineer the sub key to find the previous or next sub key.

Top 10 APIs for Demographics

Featured Imgs 23

Demographics is analytical data about human population statistics, which can include age, gender, education, income, locale, nationality, religion, and ethnicity.