Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
--
dorayme 37 2501
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO http://www.LittleWorksStudio.com
In article <4d************ *************** @NAXS.COM>,
"Jonathan N. Little" <lw*****@centra lva.netwrote:
dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
Square brackets are for attribute selectors. A useful but not often used
feature because of IE.
So... are you are implying perhaps that it was anticipated that
the square brackets would have been used more often?
--
dorayme
In article
<do************ *************** *******@news-vip.optusnet.co m.au>,
dorayme <do************ @optusnet.com.a uwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
Perhaps to build upon existing conventions. Perhaps on some keyboards
square brackets actually are harder to type. Perhaps they tossed a coin.
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
So is p {margin:0}
--
Sander Tekelenburg
The Web Repair Initiative: <http://webrepair.org/>
On 2007-11-24, dorayme wrote:
>
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
It's only one key press shorter for me; when I press { in a .css
file, the closing brace is automatically inserted.
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
--
Chris F.A. Johnson <http://cfaj.freeshell. org>
=============== =============== =============== =============== =======
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
dorayme <do************ @optusnet.com.a uwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.
By contrast, not too many devs are writing web apps in SmallTalk or
Objective-C. Even fewer than there once were, no thanks to Apple. :-(
[ObjC retain];
sherm--
--
WV News, Blogging, and Discussion: http://wv-www.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
In article <us************ ************@te xtnews.euro.net >,
Sander Tekelenburg <us**@domain.in validwrote:
In article
<do************ *************** *******@news-vip.optusnet.co m.au>,
dorayme <do************ @optusnet.com.a uwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
Perhaps to build upon existing conventions.
Which were?
Perhaps on some keyboards
square brackets actually are harder to type.
Well, that is a question, I might be seeing a biassed sample here
in Australia?
>
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
So is p {margin:0}
How do you figure this? And what is its relevance?
--
dorayme
In article <pc************ @xword.teksavvy .com>,
"Chris F.A. Johnson" <cf********@gma il.comwrote:
On 2007-11-24, dorayme wrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
p [margin: 0;]
is two key presses shorter then
p {margin: 0;}
It's only one key press shorter for me; when I press { in a .css
file, the closing brace is automatically inserted.
I vaguely recall something like this on this winbox I fire up now
and then (in a pgm called Topstyle). Similar perhaps is BBEdit's
built in control + 1 getting <h1></h1with the cursor seemingly
conveniently in between. All very well in a way. There are
drawbacks of course: you are typing away and you want a level one
heading and quickly realise it is a level 2 you want, oops... you
have to change two numbers. The normal typing way of putting the
opening tag would give you a chance (if you realise just after
typing the first 1) to merely back space on and carry on.
That reminds me, there is a whole lot of shifting going on for
for < and the greater than. But in this case, the inventors could
hardly have chosen instead the "," and "."
Perhaps a special html/css board is needed. <g>
Multiply that by a few billion over the world of css, taking in
to account a lot of consequences including the bigger chance of
typos and revisions, the greater expenditure of energy on people
and processors, more wear and tear on the keyboard.
--
dorayme
In article <m1************ @dot-app.org>,
Sherman Pendley <sp******@dot-app.orgwrote:
dorayme <do************ @optusnet.com.a uwrites:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
I suspect it's a question of familiarity - JavaScript, C, Perl, and
many other languages with which many web developers may be familiar
all use curly brackets.
Yes, I suspect this is probably the direct or indirect
motivation. I recall programming in Microsoft QuickBasic on a Mac
SE and there were few brackets involved and when they were they
were round or square (Remember those days Sherm?). Oddly enough I
forget about the later FutureBasic which I had to move to with
the PowerPC chip... I suppose Javascript and C and Perl are very
old compared to CSS...
--
dorayme
On 2007-11-24, dorayme <do************ @optusnet.com.a uwrote:
In article <us************ ************@te xtnews.euro.net >,
Sander Tekelenburg <us**@domain.in validwrote:
>In article <do*********** *************** ********@news-vip.optusnet.co m.au>, dorayme <do************ @optusnet.com.a uwrote:
Is there some particular reason that the inventors of CSS chose
to leave us with the legacy of the curly brackets (for which one
has to shift press) rather than the square (for which one simply
has to press)?
Perhaps to build upon existing conventions.
Which were?
It's common in programming languages for {} to go around bigger blocks
of stuff consisting of a few lines or more.
C, Tcl, Java, JavaScript, Perl, and Ruby are all examples where this is
the case.
I think you'd tend to use {} even when writing on paper with a pencil
for large blocks of stuff. So maybe that's where it comes from. () is
used in expressions like (2+3)*5, [] usually for array and/or dictionary
access, like a[2] or a["foo"], and {} to enclose several lines at a
time. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: deko |
last post by:
Do I need to use curly brackets in PHP if .. else statements? other constructs?
Does it matter? What are Best Practices? Why?
thanks in advance...
This seems to work WITHOUT curly brackets:
if(ereg("Win", getenv("HTTP_USER_AGENT")))
$visos = "Windows";
elseif((ereg("Mac", getenv("HTTP_USER_AGENT"))) || (ereg("PPC",
|
by: Eric Ellsworth |
last post by:
Hi all,
Does anyone have any bright ideas for Access' tendency to add square
brackets when it parses queries, then tell you that the query syntax is
invalid. In my case, I'm trying to do a LEFT JOIN on a subquery, like so:
SELECT DISTINCT .
FROM LEFT JOIN (SELECT FROM targetMarkers
WHERE targetID = Forms!frmTargetDetails ) as TM
ON . = targetMarkers.
WHERE (((targetMarkers.) Is Null));
|
by: Brian Henry |
last post by:
i was just looking at the tcplistener example on the MSDN docs and saw this
Dim bytes(1024) As
Dim data As = Nothing
the data types ar ein brackets, what is the significance of the brackets?
and when i type them into vb.net 2003 the brackets remove themself... why
are they there, what do they do? thanks!
|
by: Greg Strong |
last post by:
Hello All,
Why would brackets be added to the SQL of a pass through query to
Oracle?
If I paste the debug print of the SQL statement into SQLPlus of Oracle's
XE edition it works, and does NOT have brackets around the tablespace
preceding the table name. However when I create the pass through query
in VB brackets are placed around the tablespace, and the pass through
query does NOT work. If I eliminate the brackets around the...
|
by: Nunzio |
last post by:
I am trying to build an email address in PHP code using v5.1.2. All
works well until I try to surround the email address with angle
brackets. Every method I try causes the email address to disappear
completely. I have to believe that this is a common problem, but I
can't find any answers in the PHP docs or in Google. Any insight
would be greatly appreciated. Below are some of my failed attempts.
$strAddressee = "$ContactName...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |