473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

opacity -moz-opacity filter alpha transparency css3

This posting will express my concern about the future of css3
forthcoming recommendation.

I think for long time now, that the current implementation of CSS
attribute opacity is less than usable in practical real life situations.
The soon forthcoming CSS3 recommendation does not serve the public
interests in this area not at all. The problem relies in the definition
what opacity is, how it is to applied to page elements.

In past 5 years the web based applications have made a big leap in
visual, they are becoming more appealing and eye-catching. More and more
software applications are used via web browser. Transparency has given
us potentially to craft more versatile user interface experience to the
end user. But the problem is - POTENTIALLY.

As time has gone by, we all have witnessed how time consuming has been
for majority of the browser makers to adopt to CSS2, thus it is not
shortsighted to claim, that the same process will happen to the CSS3
likely too. Therefore it would be highly regretable if the currect
definition of opacity in CSS3 candidate recommendation will be the final
word, that defines opactiy behaviour for CSS3.

So where is the problem?
Problem is that the opacity definition seems again one of those kind,
that is specified in not foreseeable manner, that requires for browser
makers to do only little - implement few bits to acclaim the
compatibility with css3.
But the real software engineers needs, who actualy build applications
used via web browsers, are different that the CSS3 current "weak"
recommendation (section included below my posting) proposes.
There should be a ability to make elements transparent in manner, that
DOES NOT MAKE the elements containing text transparent. That is - there
should be definately a way to make element backgrounds transparent
without using IMAGES (ccs backround-image). Developing that idea, it
should also be possible to make the opacity to be applied only on parts
of the element (borders, content area etc). Although the current
inheritage system for opacity follows the natural CSS logic, it is still
totally unaceptable for software engineers of near future who craft web
applications used via web browser - there is no way to put in a box that
has opacity set another box that can be "fully seen without effect
applied". The opacity is the first of its kind of CSS properties - a
graphics filter - and thus the problem domain is totally new to the CSS
standard which traditionally basically deals with handling dimensions,
gaps, widths-heights between elements and font sizes and colors. AS
problem dmain is new, the opacity has been handled the old css way and
therefore it is and will become unusable in more complex use cases.
When the current CSS3 candidate recommendation opacity specification
will be in power, web application frontend developers will TRULY FIND NO
PRACTICAL USE for the opacity css property.
The previous examples of such kind of non demanding and
"no-hard-work-to-do" requierments (maybe compiled so due to lobby of
browser makers) for browser makers friendly spec in CSS2 was the table
cell attributes inheritage from column
http://www.w3.org/TR/CSS2/tables.html#q4
where only inherited css attributes by the specification were
'border','background','width','visibility'
and
where you could not apply such practical things as padding to the whole
column, and what even more outrageous, that the CSS2 spec never gave
orders to must-have implementation of CSS text-align property
http://www.w3.org/TR/html4/struct/tables.html#edef-COL
although as seen from HTML4.01 specification, the attributes
ALIGN
http://www.w3.org/TR/html4/sgml/dtd.html#cellhalign
VALIGN
http://www.w3.org/TR/html4/sgml/dtd.html#cellvalign
definately and clearly exist in HTML specifications and as opposed to
the majotity of in past reigned mindset, that those CSS text-align and
CSS vertical-align (aswll as other) attributes will cause inheritance
conflicts in tables, is to be prooved FALSE, as there exists the same
functionality in HTML4.01 and it works. As ALIGN and VALIGN HTML
attributes are presentational attributes it is a

shame

that the CSS2 creators should feel the guilt of offereing the world such
sub-ueber specification, as the whole concept of CSS was controlling the
presentation. Statements about inheritation conficts unresolvancy are
immature and biased, not seeing the industry everyday needs as the by
the Microsoft Internet Explorer the inheritage of table column CSS
attributes is beyond the attributes
'border','background','width','visibility'
because it uses common sense and industry needs and the performance loss
is no significant.
There is even a table of table componet virtual layers
17.5.1 Table layers and transparency
http://www.w3.org/TR/CSS2/tables.html#q4
which defines how ro draw backrounds, which have could been used to
define the inheritage for other vital table column css-properties such
as "text-align" and padding.

--
Marek Mänd
Europe, Estonia, Tallinn
P.S.
what says w3c doucuments about opacity?
http://www.w3.org/TR/2003/CR-css3-co.../#transparency
..2. Transparency: the 'opacity' property

Opacity can be thought of conceptually as a postprocessing operation.
Conceptually, after the element (including its children) is rendered
into an RGBA offscreen image, the opacity setting specifies how to blend
the offscreen rendering into the current composite rendering.
Name: opacity
Value: <alphavalue> | inherit
Initial: 1
Applies to: all elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: The same as the specified value after clipping the
<alphavalue> to the range [0.0,1.0].

<alphavalue>
Syntactically a <number>. The uniform opacity setting to be applied
across an entire object. Any values outside the range 0.0 (fully
transparent) to 1.0 (fully opaque) will be clamped to this range. If the
object is a container element, then the effect is as if the contents of
the container element were blended against the current background using
a mask where the value of each pixel of the mask is <alphavalue>.
Jul 21 '05 #1
3 10194
Marek Mänd wrote:

i took the freedom to condence your story a little.
I think the current implementation of CSS attribute opacity is less than usable. The -current- CSS3 recommendation -on opacity is not helpful-. Problem is that the opacity definition -is unclear-. There should be a ability to make elements transparent -while
keeping the text opaque-.
it should also be possible to apply the opacity on borders, content area etc. -currently, opacity is inherited and cannot be undone in nested elements-

like this i would even subscribe to your comments and wishes-list on
css-opacity. but i dont think that opacity is so important.

gl
martin
Jul 21 '05 #2
I think what you're saying is that you'd like to be able to specify
opacity with the same level of control that you have to control colour.
For example, with the current proposal you can say:

foo {
background-color: rgb(255,0,0);
color: rgb(0,0,0);
opacity: 50%;
}

and get 50%-transparent black text on a red background. But you'd like
to make it 100% opaque black text on a 50% transparent red background.
I can understand this. Perhaps the way to do it is to make the alpha
value part of the colour properties, like this:

foo {
background-color: rgba(255,0,0,128);
color: rgba(0,0,0,255);
}

This sounds sensible to me. Has the case been made to the appropriate
people? What do they say? Is the implementation efficiency
significantly impacted?

I believe that you can get the effect that you want with an extra level
of nesting:

<div class="a"><div class="b>.....

..a{
background-color: rgb(255,0,0);
opacity: 50%;
}
..b {
color: rgb(255,0,0);
opacity: 100%;
}

Is this true?

--Phil.

Jul 21 '05 #3
The original post may be a troll, but I shall feed it anyway.

On 4 Mar 2005 10:22:07 -0800, in comp.infosystems.www.authoring.stylesheets,
ph*******@treefic.com wrote:
background-color: rgba(255,0,0,128);
color: rgba(0,0,0,255);


This would be a very good thing. Really.
I'm more and more worried about the CSS2 and CSS3 specifications. It
seems like they're trying to do something very logic, very strict, and I
like that, but it really become impossible to use. I mean especially in
pratical cases.
It's certainly an old troll, but there are many thing I can't do because
implementing them would certainly make the css spec less "solid", but
these are things the webmaster *will* want to do.
The webmasters WILL WANT to have a div background half-transparent and
without using a div in a div or a 32bit-png image.
The webmasters WILL WANT to put a div with a total width
(margin+padding+border) of 50% and a specific margin and padding at
differents units and don't care that they can specify the inner width to
something. They don't know what will be its size. They don't want to use
a div in a div either.
The webmasters WILL WANT to put a background-image that will
automatiquely adjust to the size of the div.

And they want to do it simply.

Each time a friend asks for help for css, I tell them many many
workarounds, and not only because browsers do things differently.
When css will be understandable only by geeks, people will make sites
in flash or some microsoft page layout standart. :-(

--
My Webcomic: www.geeksworld.org -+- All my websites: manaworld.free.fr
There's never enough time to do all the nothing you want.
-- Calvin
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John Morey | last post by:
Im currently working on a Windows Form application in C# under .Net , the graphic designer I intend to work with asked me if I would be able to accomidate PNG style alpha transparency in images and...
1
by: Fabian | last post by:
I have heard that there is a way, using some ie-pecific scripting functions, to force msie to recognise png alpha transparencies. Does anyone know anythng about this? -- -- Fabian Visit my...
0
by: Bruno Zarokian | last post by:
Is it possible to put RGBA bitmaps in an ImageList with the designer ? I'm trying to put some PNG bitmaps with alpha in an ImageList with the designer, but it seems to convert the bitmaps in BMP...
3
by: Pablito | last post by:
Hi at all please can you inform me how I can use style="FILTER:alpha(opacity=0 to obtein dinamics image effects like fade ? Infact I tryed to use it from javascripts but I am unable from ...
1
by: dave | last post by:
I am attempted to make a semi-transparent div in IE/Firefox but IE is only making the first image in the div opaque for example if I have a div like: <div class='trans'><img src="foo.jpg"><img...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
0
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table...
8
by: mfaisalwarraich | last post by:
Hello, I am using the following method in CSS to make a PNG image transparency preserved: opacity:0.5; filter:alpha(opacity=50);
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.