Small WebKit

Issue 631: implement CSS background property

Reported by Nikolaus Schaller, Jul 7, 2014

1. the background: shorthand property is not implemented
2. the background-image property does not load any image
3. no background is drawn

A simple approach could be to draw the background image in 
-[_WebHTMLDocumentView drawRect:] but this is limited to the full 
screen background property.

If we want to set different backgrounds for each <div> 
(including <body>) we must implement that in a NSLayoutManager 
subclass that overwrites drawBackgroundForGlyphRange:atPoint:

This method should recognise a NSBackgroundImage attribute (and 
others like repeat) which are set in the _layout process where 
translation of CSS to NSAttributedString takes place.

Comment 1 by Margaret Auer, Jan 24, 2020

Thanks for sharing this amazing article about how we can make our 
background attractive with the coding commands. Visit 
https://www.assignmenthelper.com.au/math-assignment-help/ for more 
essays help. I think we we should keep doing this amazing work up.

Created: 11 years 7 months ago by Nikolaus Schaller

Updated: 6 years 18 days ago

Status: New

Followed by: 1 person

Labels:
Type:Defect
Priority:Medium
Category:CSS