Tuesday, March 16, 2010

Limelight Notes: Styling

Basic notes I am gathering on Limelight GUI framework. These are just notes that are useful to me for the research I am doing. I am throwing them up on my blog because others may find this useful as well....This is also an experiment in using MacJournal as a new note taking tool.

Prop Layout

You can layout props based on fixed size (e.g. 30 in pixel) or on a relative size ( ’90%’ of parent). If the current prop will run past 100% width then it puts that props on a new row and a y position with is one more than the tallest prop in the preview row. Two examples...

This shows that the orange and green box are laid out at a y of the tallest previous prop (blue):

root :width => 500, :height => 500 do
box :width => '50%', :height => '10%', :background_color => :red
box :width => '50%', :height => '50%', :background_color => :blue
box :width => '50%', :height => '50%', :background_color => :orange
box :width => '50%', :height => '50%', :background_color => :green
end

PastedGraphic.aNLScNOn2gLf.jpg

If we modify this example a little bit:

root :width => 500, :height => 500 do
box :width => '50%', :height => '10%', :background_color => :red
box :width => '51%', :height => '50%', :background_color => :blue
box :width => '50%', :height => '50%', :background_color => :orange
box :width => '50%', :height => '50%', :background_color => :green
end

PastedGraphic1.8s6Ex8ksxKiv.jpg

We can see that the red and blue box are laid out on separate rows now since the width of the blue box would have exceeded 100% if it was put onto the first row. This example shows another important aspect of layout. prop layout is first come first serve. The first two props fully fit the requested width and height, but the second two seem to run off the bottom.

Style Resolution

Style resolution most important to least: inline, prop name, left to right styles attribute values in that order.

Example:

props.rb:
box :width => 100, :height => 100, :styles => "big_box, heh", :background_color => :blue, :border_width => 5, :border_color => :black

styles.rb:
box {
border_color :red
}

big_box {
border_color :orange
}

heh {
border_color :blue
}

With all three, then we notice that the color is black. If I remove the inline element then we see that ‘box’ one. And ‘big_box’ comes in third if we comment out box. ‘heh’ comes in last.

A second aspect to style resolution is that any style which has overlapping behavior ends up wiping out the other style. So for example, if in the example above I add ‘left_border_width 1’, then the inline styling wipes this out with ‘:border_width => 5’. If we swap these two values so that left_border_width is the inline style then we will just see the left border and the border_width value will be wiped out. This is a very simple rule, but perhaps not what is expected in cases because

Styles in Limelight have no inheritance unlike CSS. Setting border_width of 1 on a parent will not cascade that rule to its children. If you really want to share behavior you can use extends:

fill_parent {
width '100%'
height '100%'
}

box {
extends :fill_parent
background_color :orange
}

I find this to be pretty powerful, but I would like to find a way to add methods which allow me to reduce text:

def percent_dims(w, h)
width w.to_s + ‘%’
height h.to_s + ‘%’
end

fill_parent {
percent_dims 100, 100
}

I know there is a way to extend style system, so I need to look into that...

37 comments:

  1. Thanks Tom for posting this. Your notes look to be accurate. I think these type of simple examples are really helpful for newcomers to Limelight.

    ReplyDelete
  2. Hi,
    I have Ruby on rails app with me.Now I want to integrate my app with JRuby in order to get the asynchronous feature.How do I proceed?
    Any help would be greatly appreciated,thank you very much.

    ReplyDelete
  3. Thank you for showing us how we can style our limelight notes. Honestly, I was really in such a need to understand that as I am a writer for dissertation writing UK based and there are much important stuff that I have to note down and by knowing such way of styling I can set priorities on them as well. I just can’t wait now to try this.

    ReplyDelete
  4. I think you want css expert for more creative and stylish designing. visit my page for more ideas : www.exporthub.com/auto-transportation

    ReplyDelete
  5. Thank you so much for ding the impressive job here, everyone will surely like your post. 바카라사이트

    ReplyDelete
  6. I have never seen this type of information before. Thanks for sharing this. Please also visit 카지노사이트

    ReplyDelete
  7. 스포츠토토 Iwas more than happy to find this site. I want
    to to thank you ffor your time for this particularly
    wonderful read!! I definitely savored every little bit of it and i also have yyou saved
    aas a favorite to check out new stuff in your website.

    ReplyDelete
  8. 토토 It's awesome designed for me to have a web site, which is helpful designed for my knowledge. thanks admin

    ReplyDelete

  9. You're so interesting! I don't suppose I've read anything like this before.
    So great to find someone with a few unique thoughts on this issue.
    Seriously.. many thanks for starting this up. This site is something that is needed on
    the internet, someone with some originality! 청마담

    ReplyDelete
  10. Superb information article. Thank you . The travelers need to fill up the Kenya visa application form to get the Kenya visa. Therefor, if the apply evisa kenya online online, will get the fastest visa services with 24 hours customer support.

    ReplyDelete
  11. What an outstanding post! “I'll be back” (to read more of your content). Thanks…. Foriegn travelers whose sole purpose of visiting India is for leisure, sightseeing, religious work or casual travel to visit their friends or relatives can apply for Indian tourist visa through online India visa application system.

    ReplyDelete
  12. I wanted to say Appreciate providing these details, you're doing a great job with the site... 파칭코사이트인포

    ReplyDelete
  13. I found this is an informative blog and also very useful and knowledgeable. Thank you for posting such a great article! I found your website perfect for my needs. It contains wonderful and helpful posts. Keep up the good work!. Thank you for this wonderful Article! 일본야동

    Please visit once. I leave my blog address below
    한국야동
    일본야동

    ReplyDelete
  14. It looks like I have been to this site before, but after reading some of the post I realized it is new to me. Regardless, I'm glad I found it and I will be returning soon. Apply for Indian visa application via online evisa India website.

    ReplyDelete

  15. Hi there! I thought I've been to this site before, but upon reading some of the content I realized it's brand new to me. Nonetheless, I'm definitely glad I found it and I'll be bookmarking and checking back often Apply for Indian visa application via the online evisa India website.

    ReplyDelete
  16. The user interface is very important for any product to make it win in the niche.
    When we talk about the user interface, we think about the graphical user interface. We can refer interface as a layout. It should be according to the user's requirement and convincing enough to make you stand out.
    Just like, we need a good user interface in gaming, we need a professional layout for the dissertation proposal. Dissertation Proposal writing is the initial and important stage for a master's or doctoral degree. As your degree depends on the dissertation, it is the proposal to prove it and should be professional and convincing. Don't worry, we are here with a solution. We are offering best dissertation proposal writing services for the student to make them confident for their final research thesis.

    ReplyDelete
  17. Hello everyone, Foreign citizens can enter India for business purposes. Indian government allows foreign country citizens they can can be apply for e business visa for India. e Business Visa India, Non-Indian visitors who are looking for business business or meetings, setting up industrial or business enterprises in India or other similar business activities etc.

    ReplyDelete
  18. I read your website material. It's so amazing and really enhances knowledge.I just inform you, We provide ecommerce web development company services. We aim at making e-commerce solutions technically impeccable and catchy to let your company stand out in the eCommerce market. If you have any query related to eCommerce development solutions then visit our website you will get complete information related to your query.

    ReplyDelete
  19. Wow you have nice content on your page. Your audience will enjoy it while they are read. Turkey visitors can apply e visa of Turkey online from anywhere in the world. The process is easy and convenient which saves your time & money.

    ReplyDelete
  20. I would want to state that this blog helped me decide to move forward with it. I appreciate the helpful post on Limelight Notes I've saved it and will return to see if there are any new posts. Everyone can benefit much from your content. By the way, do you realize that the prices assignment writers in edinburgh agency are really low? As a result of using this service today and being pleased, I am now referring this website to all of my friends.

    ReplyDelete
  21. I just finished reading about your incredible and thrilling experiences. Your tour in New York is the focus of the news. I hope you and your friends have a good time there. I believe that sharing images of the Inn, a Victorian-style home, will be more beneficial to your followers. I'll return to your blog when I'm done with my academic work.
    essay writing services

    ReplyDelete
  22. Really nice article. I really enjoyed reading this post and keep up the good work and let me know when you can post more articles or where I can find out more on the topic. Now it's time to get Best Roofing Services in Wayne NJ for more information.

    ReplyDelete
  23. The Turkey visa cost for Indian citizens varies according to the kind and the term of the visa requested. It is strongly advised to visit our website for the most up-to-date and correct information on visa costs and application procedures.

    ReplyDelete
  24. The Kenya tourist visa fees for Indian citizens provide an affordable and accessible option for those seeking to explore the remarkable beauty of this East African nation. The visa fees are designed to ensure a smooth entry process for Indian tourists.

    ReplyDelete
  25. It is through our collective efforts and knowledge-sharing that we create a supportive and thriving community. Thank you for being a part of this wonderful journey together. UK To Introduce ETA For 6 Countries In February 2024. Travelers from these nations who intend to visit the UK will be subject to this new requirement. Before their journey, travelers must go through the online ETA process to provide the required information and acquire authorisation. The ETA system's implementation seeks to improve border security and enable quicker entrance procedures for travelers to the UK.

    ReplyDelete
  26. This blog post truly brightened my day! The insightful content provided a fresh perspective, while the engaging writing style kept me hooked from start to finish. Nueva Jersey Orden Protección Riesgos Extremos I'm excited to implement these uplifting ideas into my own life. Kudos to the author for spreading such positivity and inspiration! 🌟

    ReplyDelete
  27. Amazing, Your blogs are really good and informative. I got a lots of useful information in your blogs. It is very great and useful to all. If the current prop will run past 100% width then it puts that props on a new row and a y position with is one more than the tallest prop in the preview row. Two examples.. trucking accident lawyer. Keeps sharing more useful blogs...

    ReplyDelete
  28. Sharing basic notes on the Limelight GUI framework on your blog is a helpful initiative, fostering knowledge exchange within the community. Utilizing MacJournal for note-taking reflects an experimental and adaptive approach. Similarly, students exploring new tools or seeking efficient note-taking methods can benefit from online resources to exam help online - get exam help online. Just as your notes aid in research, online support enhances the learning experience, providing valuable insights for students striving to master their coursework and excel in exams

    ReplyDelete
  29. Nice informative post. Thanks for sharing this beautiful blog. Keep sharing more interesting and informative blogs like this
    Abogado Federal de Defensa Criminal

    ReplyDelete
  30. Limelight Notes: Styling is a comprehensive resource for individuals looking to enhance their styling skills and knowledge in the fashion industry. Whether you're a budding stylist, a fashion enthusiast, or someone looking to improve their personal style, Limelight Notes offers valuable insights, tips, and techniques. The platform covers various aspects of styling, including fashion trends, color theory, wardrobe essentials, and styling for different body types and occasions. manassas traffic lawyer

    ReplyDelete

  31. "The poignant reflection on 'The Guilt of Not Writing Here More...' resonates with writers who grapple with the constant tug of creative responsibility. The author's candid exploration of guilt sheds light on the universal struggle to maintain consistent output in the face of life's demands. The honesty in acknowledging this internal conflict creates a relatable narrative for fellow writers, fostering a sense of community in the shared challenges of artistic expression. The post not only addresses the personal struggle but also serves as a gentle reminder that creativity is a journey, not a destination, offering solace to those navigating the ebb and flow of inspiration." dui lexington va





    ReplyDelete
  32. Capturing crucial insights on the Limelight GUI framework during my research journey, and sharing them on my blog for potential usefulness to others. Also, delving into MacJournal as a new note-taking tool, this experiment extends to encompass the exploration of data analysis services, creating a multifaceted approach to knowledge sharing and organization.

    ReplyDelete
  33. Very important and wonderful post here. This post is very helpful for every visitor. Kindly visit : abogado trafico manassas va

    ReplyDelete
  34. It seems like you're asking for notes or information related to "Limelight" and styling in the context of 4 lines. However, the request is a bit vague. Could you please provide more details or clarify your question? Are you looking for information about a specific topic related to Limelight, or do you have a particular styling requirement in mind?
    truck accident attorney




    ReplyDelete
  35. Amazing, Your blogs are really good and informative. I got a lots of useful information in your blogs. It is very great and useful to all. If the current prop will run past 100% width then it puts that props on a new row and a y position with is one more than the tallest prop in the preview row. Two examples. honorarios de abogado de bienes.. Keeps sharing more useful blogs...

    ReplyDelete
  36. Fundamental notes I'm gathering on Spotlight GUI structure. These are simply noticed that are valuable to me for the examination I'm doing. I'm hurling them on my blog since others might see this as valuable as well....This is likewise an examination in involving MacJournal as another note taking apparatus.
    Charlottesville lesión de la médula espinal Abogado

    ReplyDelete