April 24, 2014
On Thursday, 24 April 2014 at 14:59:36 UTC, H. S. Teoh via Digitalmars-d wrote:
> On Thu, Apr 24, 2014 at 04:58:06AM -0400, Nick Sabalausky via Digitalmars-d wrote:
>> On 4/23/2014 6:19 PM, H. S. Teoh via Digitalmars-d wrote:
> [...]
>> >Usually when I run into a site with (1) microscopic fonts, (2) giant
>> >(often multicolored) fonts, (3) no whitespace, or (4) has more
>> >ads/filler than content, my fingers have an almost instinctual ctrl-W
>> >(close tab) response. Sometimes not even one word registers in my
>> >brain before I move on to the next site.
>> >
>> 
>> Incidentally, ugly rainbow text is also why I set my mail client to
>> plaintext-only ages ago.
> [...]
>
> I've never left terminal-only email clients. :P
>
> For a short time at work I put up with webmail, because they didn't tell
> me pop3 access was available. Boy, that was painful. Then one day I
> discovered that I can use pop3, and oh the joy! I installed mutt and
> fetchmail, and from that day on never looked back.
>
> Nowadays, it seems that HTML-only mails are getting more common, which
> is unfortunate. Luckily, there's `elinks -dump`, which one of these days
> I'm gonna hook up to my .procmailrc so that I won't ever see HTML mails,
> ever again. >:-)
>
>
> On Thu, Apr 24, 2014 at 12:27:09PM +0000, via Digitalmars-d wrote:
>> On Thursday, 24 April 2014 at 08:58:13 UTC, Nick Sabalausky wrote:
>> >I agree. Unfortunately though, browsers haven't always has reasonable
>> >defaults, so people had to work around, so now it's all pretty much
>> >screwed.
>> >
>> >Maybe what we need is a CSS for "sane-size-defaults: on;" which would
>> >provide a "reboot" of the whole default font sizes.
>> 
>> The defaults in the original browsers were set a bit large (16px), so
>> Safari decided to set them smaller for a while. That sucked. Nowadays
>> you can just set the scaling of the body to 87.5% of the default and
>> get a reasonable size (14px).
>
> Funny. I find anything below 16pt unreadably small.

According to the CCS 2.1 standard 1 px == 0.75pt.

http://www.w3.org/TR/CSS21/syndata.html#length-units

Thus:

16pt => 12px => 3.1mm at a reading distance of 71 cm.

Yep, that pretty tiny. :-)

> TBH, I find this "pixel perfect" obsession to be really silly.  It shows that web developers don't understand that what the user
> sees is NOT what developers see

If we are talking about fixed sizes, sure. Pixel perfect in this context means that black lines of the fonts are aligned with the pixel layout so you get sharp black lines and not blurry gray shit that looks like it are out of focus. To get that right you have to adjust the font/rendering engine so the lines match up.

When it comes to graphics there is no longer an excuse for not gong whole sale SVG. IE8 is thankfully not a contender anymore! :-) Misaligned vector-graphics is not so bad if you avoid 1 hardware-pixel thin lines. (Or you can adjust it with javascript).

One property missing on LCDs that CRTs have is the lowpass filter after the D/A conversion, which leads to jagged artifacts. Thus they are "pixel perfect" by nature. There is now way around it. If you don't want "pixel perfect" then you have to go back to CRTs where the phosphors is your reconstruction filter. Of course, this doesn't matter with very high resolution displays.

(I am also clinging onto my 1600x1200 display…)

> "This site is best
> viewable in AAAxYYY resolution" is so last century. When are we gonna grow out of that?!

I dunno.

The current fad is: «this site is best viewed on a cellphone so we have almost no content, but let's

                          SCALE UP THE
                           FONT AND
                        CENTER THE TEXT

so it looks nice on desktops. Mobile first!»

April 24, 2014
On Thursday, 24 April 2014 at 14:42:44 UTC, Adam D. Ruppe wrote:
> On Thursday, 24 April 2014 at 03:59:00 UTC, Rikki Cattermole wrote:
>> Can we have it as a library?
>
> css.d in there has the lib code now with my other html stuff stripped out so it has fewer dependencies. Can dub just use it without using the little main file?
Ugh it can yes. But when you set the target type it definitely cannot.

You probably want a dub.json file like this:

{
	"name": "cssexpand",
	"description": "A CSS expansion program",
	"authors": ["Adam D. Ruppe"],
	"homepage": "https://github.com/adamdruppe/cssexpand",
	"license": "BSL-1.0",
	"dependencies": {
		"cssexpand:library": "~master"
	},
	"subPackages": [
		{
			"name": "tool",
			"dependencies": {
				"cssexpand:library": "~master"
			},
			"mainSourceFile": "src/cssexpand.d",
			"targetType": "executable"
		},
		{
			"name": "library",
			"sourceFiles": ["src/css.d", "src/color.d"],
			"targetType": "library"
		}
	]
}

Defaults a library. To run the tool its basically:
dub run cssexpand:tool toolargs...
Or you can swap them, up to you.

> Note btw that this code is *brutally* slow and should be done ahead of time or at least aggressively cached; if you regenerate the file on each request you'll be surprised by how much cpu time it wastes.
Lets not go into how much javascript code I'm generating in Cmsed ;) So not a worry.

> The implementation is pretty much a brute force string search in a replace loop.

April 24, 2014
Am 24.04.2014 17:34, schrieb "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang@gmail.com>":
> According to the CCS 2.1 standard 1 px == 0.75pt.
>
> http://www.w3.org/TR/CSS21/syndata.html#length-units
>
> Thus:
>
> 16pt => 12px => 3.1mm at a reading distance of 71 cm.

16pt => 21.3px
April 24, 2014
On Thursday, 24 April 2014 at 15:55:36 UTC, Sönke Ludwig wrote:
> Am 24.04.2014 17:34, schrieb "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang@gmail.com>":
>> According to the CCS 2.1 standard 1 px == 0.75pt.
>>
>> http://www.w3.org/TR/CSS21/syndata.html#length-units
>>
>> Thus:
>>
>> 16pt => 12px => 3.1mm at a reading distance of 71 cm.
>
> 16pt => 21.3px

Yeah, I thought it was a bit odd, it sounded more like 9pt. I guess Theo should look into the DPI settings if possible.
April 24, 2014
Am 24.04.2014 16:42, schrieb Adam D. Ruppe:
> On Thursday, 24 April 2014 at 03:59:00 UTC, Rikki Cattermole wrote:
>> Can we have it as a library?
>
> css.d in there has the lib code now with my other html stuff stripped
> out so it has fewer dependencies. Can dub just use it without using the
> little main file?
>

This should automatically yield two configurations - "application" and "library":

{
	"name": "cssexpand",
	"description": "A CSS expansion program",
	"authors": ["Adam D. Ruppe"],
	"homepage": "https://github.com/adamdruppe/cssexpand",
	"license": "BSL-1.0",
	"mainSourceFie":"src/cssexpand.d"
}

Running DUB directly on cssexpand will build the executable by default and using it as a dependency will cause it to be build it as a library.

April 24, 2014
Am 24.04.2014 17:59, schrieb Sönke Ludwig:
> Am 24.04.2014 16:42, schrieb Adam D. Ruppe:
>> On Thursday, 24 April 2014 at 03:59:00 UTC, Rikki Cattermole wrote:
>>> Can we have it as a library?
>>
>> css.d in there has the lib code now with my other html stuff stripped
>> out so it has fewer dependencies. Can dub just use it without using the
>> little main file?
>>
>
> This should automatically yield two configurations - "application" and
> "library":
>
> ...

Meh, unfortunately it requires to add the tow configurations manually:

{
	"name": "cssexpand",
	"description": "A CSS expansion program",
	"authors": ["Adam D. Ruppe"],
	"homepage": "https://github.com/adamdruppe/cssexpand",
	"license": "BSL-1.0",
	"mainSourceFile": "src/cssexpand.d",
	"configurations": [
		{
			"name": "application",
			"targetType": "executable"
		},
		{
			"name": "library",
			"targetType": "library",
			"excludedSourceFiles": ["src/cssexpand.d"]
		}
	]
}


BTW, no need to keep both, dub.json and package.json. If you want to stay compatible with old DUB versions, just use package.json, it will still be supported for new versions as well.
April 24, 2014
On Thu, Apr 24, 2014 at 03:59:17PM +0000, via Digitalmars-d wrote:
> On Thursday, 24 April 2014 at 15:55:36 UTC, Sönke Ludwig wrote:
> >Am 24.04.2014 17:34, schrieb "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang@gmail.com>":
> >>According to the CCS 2.1 standard 1 px == 0.75pt.
> >>
> >>http://www.w3.org/TR/CSS21/syndata.html#length-units
> >>
> >>Thus:
> >>
> >>16pt => 12px => 3.1mm at a reading distance of 71 cm.
> >
> >16pt => 21.3px
> 
> Yeah, I thought it was a bit odd, it sounded more like 9pt. I guess Theo should look into the DPI settings if possible.

I like my fonts nice and big. It's just me. :)

I think I got confused and misread 12px as 12pt. 12px isn't unreadably small on a lower resolution screen: at work, where the screen resolution is 1280x1024, I have my fonts set to 15pt, which is about 12px. At home, with a 1600x1200 screen, I have my font set to 18pt, not sure exactly what that is in px, but should be around 17px I think.


T

-- 
MACINTOSH: Most Applications Crash, If Not, The Operating System Hangs
April 24, 2014
On 2014-04-24 16:19, Adam D. Ruppe wrote:

> Hmm, looking at the sass webpage, I think I could do some of the
> features but prolly not all and with a different syntax. So it wouldn't
> work for a full scss compiler.

Sass really has some advanced features. It's possible to create a function in Ruby which you can call from Sass.

-- 
/Jacob Carlborg
April 24, 2014
On 24/04/2014 9:44 AM, Dicebot wrote:
> Considering the very same size 9 fonts are used as default everywhere
> else in my desktop system and it feels just fine.. yeah, you must be
> right. It must be small font and not weirdly scaled UI with 2/3 of
> screen space blank. Sure.

We must just be oppositesAt the distance I sit from my monitor 9pt type is vanishingly small, I can read it as I type it, but not once I've forgotten what it says. I couldn't work like that.

I find that most sites use fonts that are too small, I often zoom until what I want to read fills the screen at a reasonable line length. don't know for sure how big that makes it but its probably around 32pt.

Sites that have too much empty space around the text are often the ones that are kindest to zooming. others that try to fill the void tend to reflow at every step of zoom and get to very short lines very quickly.
April 24, 2014
On 24/04/2014 9:44 AM, Dicebot wrote:
> Considering the very same size 9 fonts are used as default everywhere
> else in my desktop system and it feels just fine.. yeah, you must be
> right. It must be small font and not weirdly scaled UI with 2/3 of
> screen space blank. Sure.

We must just be opposites.

I tested. At the distance I sit from my monitor 9pt type is vanishingly small, I can read it as I type it, but not once I've forgotten what it says. I couldn't work like that, I certainly could not bare to browse the web like that.

I often zoom in on websites until what I want to read fills the screen at a reasonable line length. I don't know for sure how big that makes it but its probably between 24pt and 32pt. (When I'm coding I have my IDE set to 20pt.)

Sites that have too much empty space around the text are often the ones that are kindest to zooming. others that try to fill the void tend to reflow at every step of zoom and line lengths get ridiculously short as the filler expands.

I dislike empty space, but I'd rather a page were designed with a fixed maximum line length for readability and allow the reader to zoom, than with the objective of filling every pixel of screen with text.

For the record, I am quite severely dyslexic, and mildly myopic, but I don't believe my preference for large type is related to either.

A...