Re: [Backgrounds/Borders] Request to remove no-clip value from background-clip

Brad Kemper wrote:
> On Mar 25, 2009, at 7:18 PM, "Robert O'Callahan" <> 
> wrote:
>> On Thu, Mar 26, 2009 at 2:43 PM, Brad Kemper <> 
>> wrote:
>> Wouldn't it be useful in case where you had, say, a logo watermark 
>> image centered behind a paragraph, and you didn't want it to be 
>> clipped or resized if the text was not enough lines to ensure 
>> otherwise, and you didn't want the paragraph to have a min-height?
>> You could use something like this:
>> p {
>>   position:relative;
>>   z-index:0;
>> }
>> p::before {
>>   position:absolute;
>>   z-index:-1;
>>   content:url(logo.png);
>>   left:0;
>>   right:0;
>>   width:256px;
>>   margin-left:auto;
>>   margin-right:auto;
>> }
>> Rob
> Yeah, I guess so. Kind of complicated and less intuitive for authors. 
> More complicated for implementors otherwise.

And also semantically dubious: the P is now both a positioning context 
and a stacking context, neither of which is necessarily desirable.  (In 
recent years we've seen 'position' increasingly perceived as a panacea 
to many layout ills but its consequences are more subtle and 
far-reaching than many authors realize.)

Which is not to say that I don't sympathize with implementors over 
background-clip:no-clip, which would represent a significant extension 
to the traditional CSS box philosophy.

Anton Prowse

Received on Thursday, 26 March 2009 04:00:17 UTC