• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CSS style string to NSAttributedString attributes conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSS style string to NSAttributedString attributes conversion


  • Subject: Re: CSS style string to NSAttributedString attributes conversion
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 9 Apr 2010 12:24:21 +0100

On 8 Apr 2010, at 17:19, Jens Alfke wrote:
>
> I'm not aware of anything that does this.
> Are you talking about parsing entire CSS files, or just a single "property: value;" rule?
> Even the simple case isn't that simple; CSS can be pretty complex. And most of the attributes don't map cleanly into AppKit text attributes.

I don't need complex CSS transposition just fairly simple CSS property: value to attributes.
The CSS -> attribute mapping doesn't need to be exact. Decent coverage of the major CSS text based properties would be enough

>
> —Jens

> AppKit doesn't expose anything to handle CSS by itself, but if CSS is applied to HTML, AppKit's HTML import will convert it to attributes on the text.  You might be able to make use of that.
>

Thanks douglas. This approach might work.

> Douglas Davidson



Regards

Jonathan_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >CSS style string to NSAttributedString attributes conversion (From: "email@hidden" <email@hidden>)
 >Re: CSS style string to NSAttributedString attributes conversion (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: CFRunLoopStop exception
  • Next by Date: Re: NSTableView Key Value Observing performance pickle
  • Previous by thread: Re: CSS style string to NSAttributedString attributes conversion
  • Next by thread: Re: CSS style string to NSAttributedString attributes conversion
  • Index(es):
    • Date
    • Thread