Code Monkey home page Code Monkey logo

css.tmbundle's Introduction

TextMate

Download

You can download TextMate from here.

Feedback

You can use the TextMate mailing list or #textmate IRC channel on freenode.net for questions, comments, and bug reports.

You can also contact MacroMates.

Before you submit a bug report please read the writing bug reports instructions.

Screenshot

textmate

Building

Setup

To build TextMate, you need the following:

All this can be installed using either Homebrew or MacPorts:

# Homebrew
brew install boost capnp google-sparsehash multimarkdown ninja ragel

# MacPorts
sudo port install boost capnproto multimarkdown ninja ragel sparsehash

After installing dependencies, make sure you have a full checkout (including submodules) and then run ./configure followed by ninja, for example:

git clone --recursive https://github.com/textmate/textmate.git
cd textmate
./configure && ninja TextMate/run

The ./configure script simply checks that all dependencies can be found, and then calls bin/rave to bootstrap a build.ninja file with default config set to release and default target set to TextMate.

Building from within TextMate

You should install the Ninja bundle which can be installed via PreferencesBundles.

After this you can press ⌘B to build from within TextMate. In case you haven't already you also need to set up the PATH variable either in PreferencesVariables or ~/.tm_properties so it can find ninja and related tools; an example could be $PATH:/usr/local/bin.

The default target (set in .tm_properties) is TextMate/run. This will relaunch TextMate but when called from within TextMate, a dialog will appear before the current instance is killed. As there is full session restore, it is safe to relaunch even with unsaved changes.

If the current file is a test file then the target to build is changed to build the library to which the test belongs (this is done by setting TM_NINJA_TARGET in the .tm_properties file found in the root of the source tree).

Similarly, if the current file belongs to an application target (other than TextMate.app) then TM_NINJA_TARGET is set to build and run this application.

Build Targets

For the TextMate.app application there are two symbolic build targets:

ninja TextMate      # Build and sign TextMate
ninja TextMate/run  # Build, sign, and (re)launch TextMate

To clean everything run:

ninja -t clean

Or simply delete ~/build/TextMate.

Legal

The source for TextMate is released under the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

TextMate is a trademark of Allan Odgaard.

css.tmbundle's People

Contributors

binarytales avatar bradchoate avatar ciaran avatar fredb avatar hausofwong avatar infininight avatar joshvarner avatar lilyball avatar martinbean avatar mietek avatar nanoant avatar nobios avatar noniq avatar rossb avatar sorbits avatar subtlegradient avatar torsten avatar turadg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

css.tmbundle's Issues

[Suggestion] Improve visibility of @media etc. in symbol list

It would be cool if in the symbols list, keywords like @media etc. could be highlighted (i.e. bold), reverse-indented or contrasted in another way.

This would vastly improve overview when working on huge CSS files that contain large blocks of repeated statements, which just are separated by media queries.

Adopting code idention alone doesn't always work because it relies on correct indention, which often isn't the case.

Failure running “CodeCompletion CSS Properties”.

Hi

When I try to auto complete any css line I get the below error

Failure running “CodeCompletion CSS Properties”.
/Users/shadow/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/codecompletion.rb:319:in to_ary': undefined methodmap' for nil:NilClass (NoMethodError)
from /Users/shadow/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/codecompletion.rb:88:in initialize' from /Users/shadow/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/codecompletion.rb:60:innew'
from /Users/shadow/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/lib/codecompletion.rb:60:in `plist'
from CodeCompletion CSS Properties:3

I trying to uninstall, restart & install the bundle but still no luck.

Some tags are not highlighted in CSS

While reading through CSS file I noticed that svg tag was not colored as others: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css#L58
screenshot from 2014-12-23 15 07 25

It seems that svg is missing in this regular expression: https://github.com/textmate/css.tmbundle/blob/master/Syntaxes/CSS.plist#L711, unlike audio and canvas, which are present there and are colored green as well.

It would be good to compare existing regular expression against a credible list like this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element

However, HTML5 allows the creation of custom elements: http://www.html5rocks.com/en/tutorials/webcomponents/customelements/. In this case shall we have a discussion of whether to:

  • complete the list with missing tags or
  • make a new regular expression to adjust to custom tags?

Semicolon no longer auto appended

When writing CSS code, it no longer automatically appends the semicolon.

Here is how it was if I typed "background:":

element { background: ; }

and now it no longer adds that semicolon:

element { background: }

This was a huge time saver and it's odd that it stopped working. Any ideas?

Thanks,
Matt

Word movement improvement

Hyphenated words should scope the hyphen as punctuation.

For example:

.my-class {
    font-weight: bold;
}

Here both my-class and font-weight are treated as a single unit when using option left/right.

Update CSS Colors to latest WC3 Spec

The current color list in the CSS Bundle is outdated as it lists named colours as invalid (i.e. aliceblue, royal blue, etc.)

Updating to the latest working draft (https://www.w3.org/TR/css-color-4/) would be great as it'll simplify the named color section. It also includes 'currentcolor' which is already implemented in most major browsers.

Insert Color command hangs for a bout a minute

When using the Insert Color command in a CSS or SCSS file to get the color picker, Textmate freezes completely for a minute or two.
After that, the color picker appears (with a system boink sound)

Can't see any log messages about it in System log.

Latest Textmate 2 version

Advice on extending CSS syntax

Apologies if this is not the right place for this question.

I'm working on a bundle for a language which is a superset of CSS and it seemed logical to not repeat any of the work already done in the CSS bundle.

However, I'm finding that it's harder than I assumed to leverage the existing rules.

For example, I'd like to add some new rules to apply syntax highlighting to expressions like the following:

#avatar[width] == #avatar[height];
#avatar[border-radius] == #avatar[width] / 2;

How would I implement this without needing to redefine all of the CSS selectors? Is there a better way than just defining rules for the new operators on their own?

My attempts to use a begin/end rule have been unsuccessful and using captures doesn't seem well suited.

A second example is that I'd like rules for some new pseudo selectors:

#logo[center] == ::window[center];

This has proven surprisingly difficult for some reason, with my new rule apparently conflicting with some existing ones, especially within a new @-rule:

@stay button[width], ::window[width];

I tried creating a begin/end rule for this and tried to include my new rule and source.css inside patterns but again could only get one of them to work by removing the other.

There are many more features but I feel that these simple examples epitomize the main issues I'm having.

I have some experience with the .tmLanguage format and have tried several approaches now, but I'm hoping that some insight regarding the examples above will help me to understand something fundamental that I'm missing.

More specifically, I'd love to know how to work best with this existing bundle.

I should note that I'm also targeting some other editors where I believe that some newer features of the syntax definitions are unavailable.

Thanks.

Color Picker modal window is broken in Yosemite

Mac OS X Yosemite has rearranged the modal window to the Color Picker, and this is now affects the ability to use the eye dropper or the color wells, as they now conflict with the position of the Cancel and OK buttons. Clicking the eye dropper does nothing until hitting cancel, upon which the eye dropper tool is active.

Example

"Insert Color..." does not work in OS X Mavericks

In OS X Mountain Lion, selecting "CSS -> Insert Color...", or using the default shortcut of cmd-shift-c would bring up the system colour chooser. Now, when doing the same in OS X Mavericks, the TextMate window defocuses for a moment, then refocuses, but the colour chooser never appears. This happens both in CSS files (when using the menu item or the shortcut) and in other files (when using the menu item).

[css] @namespace is not syntax highlighted

From @dstorey on December 26, 2015 10:43

Works correctly in the parser for linting and in Intellisense, but isn't syntax highlighted as missing from css.plist

screen shot 2015-12-26 at 2 37 41 am

Syntax should be:

namespace
: NAMESPACE_SYM S* [namespace_prefix S_]? [STRING|URI] S_ ';' S*
;
namespace_prefix
: IDENT
;

My knowledge of the syntax of css.plist and regexp isn't good enough at the moment to work out how to add the optional IDENT, as there is no predefined ident like there is for strings, etc. I know how to highlight the @namespace and string component though.

I figure the IDENT should be coloured the same as @namespace as that is how the media type token is coloured for '@media media-type'

Copied from original issue: microsoft/vscode#1659

CSS Custom Properties

Live example

Markdown

```css
:root {
    --ThemeColor: #3c790a;
    --primaryColor: #b4d455;
}

ui-widget {
    background-color: var(--ThemeColor);
    color: var(--primaryColor);
}
:root {
    --ThemeColor: #3c790a;
    --primaryColor: #b4d455;
}

ui-widget {
    background-color: var(--ThemeColor);
    color: var(--primaryColor);
}

Screenshot in case it changes
screen shot 2016-09-22 at 4 23 34 pm

Changes to RegEx in meta.property-list.css

The following regex change creates an unbalanced stdin:
8aad91d#L0R339

Only the opening bracket is returned instead of both opening and closing brackets.

So the stdin value of the meta.property-list.css scope in the following rule:
#selector {
property:value;
}

returns:
{
property:value;

and should instead return:
{
property:value;
}

[Bug] Selectors like [class*="wp-block"] are displayed incorrectly in symbols list

Selectors starting with square brackets like [class*="wp-block"] { … } are common in Gutenberg-enabled Wordpress theme CSS files. (They match any CSS classes starting with "wp-block…" without having to know class names added later.)

However they have a confusing display in the symbols list:
Bildschirmfoto 2022-07-08 um 12 17 51 Kopie
Note:
Classical selector (green) works flawlessly and its idention is consistent with code.
Square brackets selector (red) kinda works, but first bracket and indention are stripped, which is confusing when one needs to rely on indention structure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.